mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Fix some stream info overrides
This commit is contained in:
parent
ca093875b4
commit
f3070763fa
4 changed files with 53 additions and 12 deletions
|
@ -58,6 +58,14 @@ MEDIA_FLAGS_VIDEO = {'avc1': 'h264',
|
|||
|
||||
AUDIO_CODEC_OVERRIDES = {'truehd': 'TrueHD'}
|
||||
|
||||
VIDEO_RESOLUTION_OVERRIDES = {'sd': 'SD',
|
||||
'480': '480p',
|
||||
'576': '576p',
|
||||
'720': '720p',
|
||||
'1080': '1080p',
|
||||
'4k': '4k'
|
||||
}
|
||||
|
||||
AUDIO_CHANNELS = {'1': 'Mono',
|
||||
'2': 'Stereo',
|
||||
'3': '2.1',
|
||||
|
|
|
@ -1279,7 +1279,7 @@ class PmsConnect(object):
|
|||
else:
|
||||
transcode_throttled = 0
|
||||
|
||||
if helpers.get_xml_attr(transcode_info, 'transcodeHwRequested') == '1':
|
||||
if helpers.get_xml_attr(transcode_info, 'transcodeHwFullPipeline') == '1':
|
||||
transcode_hardware = 1
|
||||
else:
|
||||
transcode_hardware = 0
|
||||
|
@ -1404,6 +1404,13 @@ class PmsConnect(object):
|
|||
else:
|
||||
transcode_decision = 'direct play'
|
||||
|
||||
stream_video_width = helpers.get_xml_attr(stream_media_info, 'width')
|
||||
if helpers.cast_to_int(stream_video_width) >= 3840:
|
||||
stream_video_resolution = '4k'
|
||||
else:
|
||||
stream_video_resolution = helpers.get_xml_attr(stream_media_info, 'videoResolution').rstrip('p')
|
||||
|
||||
|
||||
stream_details = {'stream_container': helpers.get_xml_attr(stream_media_info, 'container'),
|
||||
'stream_bitrate': helpers.get_xml_attr(stream_media_info, 'bitrate'),
|
||||
'stream_aspect_ratio': helpers.get_xml_attr(stream_media_info, 'aspectRatio'),
|
||||
|
@ -1412,7 +1419,7 @@ class PmsConnect(object):
|
|||
'stream_audio_channel_layout': common.AUDIO_CHANNELS.get(stream_audio_channels, stream_audio_channels),
|
||||
'stream_video_codec': helpers.get_xml_attr(stream_media_info, 'videoCodec'),
|
||||
'stream_video_framerate': helpers.get_xml_attr(stream_media_info, 'videoFrameRate'),
|
||||
'stream_video_resolution': helpers.get_xml_attr(stream_media_info, 'videoResolution'),
|
||||
'stream_video_resolution': stream_video_resolution,
|
||||
'stream_video_height': helpers.get_xml_attr(stream_media_info, 'height'),
|
||||
'stream_video_width': helpers.get_xml_attr(stream_media_info, 'width'),
|
||||
'stream_duration': helpers.get_xml_attr(stream_media_info, 'duration'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue