Add detailed stream info to notification options

This commit is contained in:
JonnyWong16 2017-02-25 22:30:47 -08:00
parent e272a0eecc
commit 992f0baf93
5 changed files with 240 additions and 53 deletions

View file

@ -2767,7 +2767,7 @@ pre::-webkit-scrollbar-thumb {
} }
.notification-params td:first-child { .notification-params td:first-child {
padding-left: 10px; padding-left: 10px;
width: 200px; width: 250px;
} }
.notification-params.time-options td:first-child { .notification-params.time-options td:first-child {
padding-left: 10px; padding-left: 10px;

View file

@ -1500,7 +1500,7 @@
</div> </div>
</div> </div>
<div id="notifier-config-modal" class="modal fade wide" tabindex="-1" role="dialog" aria-labelledby="notifier-config-modal"></div> <div id="notifier-config-modal" class="modal fade wide" tabindex="-1" role="dialog" aria-labelledby="notifier-config-modal"></div>
<div id="notify-text-sub-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="notify-text-sub-modal"> <div id="notify-text-sub-modal" class="modal fade wide" tabindex="-1" role="dialog" aria-labelledby="notify-text-sub-modal">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@ -1596,80 +1596,207 @@
</tr> </tr>
<tr> <tr>
<td><strong>{ip_address}</strong></td> <td><strong>{ip_address}</strong></td>
<td>The IP address of the device being used for playback. <span class="small-muted">(PMS 0.9.14 and above)</span></td> <td>The IP address of the device being used for playback.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{stream_duration}</strong></td> <td><strong>{stream_duration}</strong></td>
<td>The stream duration (in minutes) for the item.</td> <td>The duration (in minutes) for the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{stream_time}</strong></td> <td><strong>{stream_time}</strong></td>
<td>The stream duration (in time format) for the item.</td> <td>The duration (in time format) of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{remaining_duration}</strong></td> <td><strong>{remaining_duration}</strong></td>
<td>The remaining duration (in minutes) for the item.</td> <td>The remaining duration (in minutes) of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{remaining_time}</strong></td> <td><strong>{remaining_time}</strong></td>
<td>The remaining duration (in time format) for the item.</td> <td>The remaining duration (in time format) of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{progress_duration}</strong></td> <td><strong>{progress_duration}</strong></td>
<td>The last reported offset (in minutes) for the item.</td> <td>The last reported offset (in minutes) of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{progress_time}</strong></td> <td><strong>{progress_time}</strong></td>
<td>The last reported offset (in time format) for the item.</td> <td>The last reported offset (in time format) of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{progress_percent}</strong></td> <td><strong>{progress_percent}</strong></td>
<td>The last reported progress percent for the item.</td> <td>The last reported progress percent of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_decision}</strong></td> <td><strong>{transcode_decision}</strong></td>
<td>The stream transcode decisions for the media item.</td> <td>The transcode decisions of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{video_decision}</strong></td> <td><strong>{video_decision}</strong></td>
<td>The video transcode decisions for the media item.</td> <td>The video transcode decisions of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{audio_decision}</strong></td> <td><strong>{audio_decision}</strong></td>
<td>The audio transcode decisions for the media item.</td> <td>The audio transcode decisions of the stream.</td>
</tr>
<tr>
<td><strong>{subtitle_decision}</strong></td>
<td>The subtitle transcode decisions of the stream.</td>
</tr>
<tr>
<td><strong>{quality_profile}</strong></td>
<td>The Plex quality profile of the stream. <span class="small-muted">(e.g. 4 Mbps 720p)</span></td>
</tr>
<tr>
<td><strong>{optimized_version}</strong></td>
<td>If the stream is an optimized version. <span class="small-muted">(0 or 1)</span></td>
</tr>
<tr>
<td><strong>{stream_local}</strong></td>
<td>If the stream is local. <span class="small-muted">(0 or 1)</span></td>
</tr>
<tr>
<td><strong>{stream_location}</strong></td>
<td>The network location of the stream. <span class="small-muted">(lan or wan)</span></td>
</tr>
<tr>
<td><strong>{stream_bandwidth}</strong></td>
<td>
The required bandwidth (in kbps) of the stream.
<p class="small-muted">(<em>not</em> the used bandwidth)</p>
</td>
</tr>
<tr>
<td><strong>{stream_container}</strong></td>
<td>The media container of the stream.</td>
</tr>
<tr>
<td><strong>{stream_bitrate}</strong></td>
<td>The bitrate (in kbps) of the stream.</td>
</tr>
<tr>
<td><strong>{stream_aspect_ratio}</strong></td>
<td>The aspect ratio of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_codec}</strong></td>
<td>The video codec of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_bitrate}</strong></td>
<td>The video bitrate (in kbps) of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_framerate}</strong></td>
<td>The video framerate of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_resolution}</strong></td>
<td>The video resolution of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_height}</strong></td>
<td>The video height of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_width}</strong></td>
<td>The video width of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_language}</strong></td>
<td>The video language of the stream.</td>
</tr>
<tr>
<td><strong>{stream_video_language_code}</strong></td>
<td>The video language code of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_bitrate}</strong></td>
<td>The audio bitrate of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_bitrate_mode}</strong></td>
<td>The audio bitrage mode of the stream. <span class="small-muted">(cbr or vbr)</span></td>
</tr>
<tr>
<td><strong>{stream_audio_codec}</strong></td>
<td>The audio codec of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_channels}</strong></td>
<td>The audio channels of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_language}</strong></td>
<td>The audio language of the stream.</td>
</tr>
<tr>
<td><strong>{stream_audio_language_code}</strong></td>
<td>The audio language code of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_codec}</strong></td>
<td>The subtitle codec of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_container}</strong></td>
<td>The subtitle container of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_format}</strong></td>
<td>The subtitle format of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_language}</strong></td>
<td>The subtitle language of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_language_code}</strong></td>
<td>The subtitle language code of the stream.</td>
</tr>
<tr>
<td><strong>{stream_subtitle_location}</strong></td>
<td>The subtitle location of the stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_container}</strong></td> <td><strong>{transcode_container}</strong></td>
<td>The media container of the transcoded media.</td> <td>The media container of the transcoded stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_video_codec}</strong></td> <td><strong>{transcode_video_codec}</strong></td>
<td>The video codec of the transcoded media.</td> <td>The video codec of the transcoded stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_video_width}</strong></td> <td><strong>{transcode_video_width}</strong></td>
<td>The video width of the transcoded media.</td> <td>The video width of the transcoded stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_video_height}</strong></td> <td><strong>{transcode_video_height}</strong></td>
<td>The video height of the transcoded media.</td> <td>The video height of the transcoded stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_audio_codec}</strong></td> <td><strong>{transcode_audio_codec}</strong></td>
<td>The audio codec of the transcoded media.</td> <td>The audio codec of the transcoded stream.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_audio_channels}</strong></td> <td><strong>{transcode_audio_channels}</strong></td>
<td>The audio channels of the transcoded media.</td> <td>The audio channels of the transcoded stream.</td>
</tr>
<tr>
<td><strong>{transcode_hardware}</strong></td>
<td>If hardware transcoding is used. <span class="small-muted">(0 or 1)</span></td>
</tr> </tr>
<tr> <tr>
<td><strong>{session_key}</strong></td> <td><strong>{session_key}</strong></td>
<td>The unique identifier for the stream session.</td> <td>The unique identifier for the session.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{transcode_key}</strong></td> <td><strong>{transcode_key}</strong></td>
<td>The unique identifier for the transcode session.</td> <td>The unique identifier for the transcode session.</td>
</tr> </tr>
<tr>
<td><strong>{session_id}</strong></td>
<td>The unique identifier for the stream.</td>
</tr>
<tr> <tr>
<td><strong>{user_id}</strong></td> <td><strong>{user_id}</strong></td>
<td>The unique identifier for the user.</td> <td>The unique identifier for the user.</td>
@ -1684,19 +1811,23 @@
<thead> <thead>
<tr> <tr>
<th colspan="2"> <th colspan="2">
Metadata Details Source Metadata Details
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td><strong>{media_type}</strong></td> <td><strong>{media_type}</strong></td>
<td>The type of media. <span class="small-muted">(movie, episode, track)</span></td> <td>The type of media. <span class="small-muted">(movie, show, season, episode, artist, album, track)</span></td>
</tr> </tr>
<tr> <tr>
<td><strong>{container}</strong></td> <td><strong>{container}</strong></td>
<td>The media container of the original media.</td> <td>The media container of the original media.</td>
</tr> </tr>
<tr>
<td><strong>{aspect_ratio}</strong></td>
<td>The aspect ratio of the original media.</td>
</tr>
<tr> <tr>
<td><strong>{video_codec}</strong></td> <td><strong>{video_codec}</strong></td>
<td>The video codec of the original media.</td> <td>The video codec of the original media.</td>
@ -1706,24 +1837,20 @@
<td>The video bitrate of the original media.</td> <td>The video bitrate of the original media.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{video_width}</strong></td> <td><strong>{video_framerate}</strong></td>
<td>The video width of the original media.</td> <td>The video framerate of the original media.</td>
</tr>
<tr>
<td><strong>{video_height}</strong></td>
<td>The video height of the original media.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{video_resolution}</strong></td> <td><strong>{video_resolution}</strong></td>
<td>The video resolution of the original media.</td> <td>The video resolution of the original media.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{video_framerate}</strong></td> <td><strong>{video_width}</strong></td>
<td>The video framerate of the original media.</td> <td>The video width of the original media.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{aspect_ratio}</strong></td> <td><strong>{video_height}</strong></td>
<td>The aspect ratio of the original media.</td> <td>The video height of the original media.</td>
</tr> </tr>
<tr> <tr>
<td><strong>{audio_codec}</strong></td> <td><strong>{audio_codec}</strong></td>

View file

@ -68,3 +68,18 @@ SCHEDULER_LIST = ['Check GitHub for updates',
'Backup PlexPy database', 'Backup PlexPy database',
'Backup PlexPy config' 'Backup PlexPy config'
] ]
QUALITY_PROFILES = {'20000': '20 Mbps 1080p',
'12000': '12 Mbps 1080p',
'10000': '10 Mbps 1080p',
'8000': '8 Mbps 1080p',
'4000': '4 Mbps 720p',
'3000': '3 Mbps 720p',
'2000': '2 Mbps 720p',
'1500': '1.5 Mbps 480p',
'720': '720 kbps',
'320': '320 kbps',
'208': '208 kbps',
'96': '96 kbps',
'64': '64 kbps'
}

View file

@ -437,26 +437,57 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, *
'transcode_decision': transcode_decision, 'transcode_decision': transcode_decision,
'video_decision': session.get('video_decision',''), 'video_decision': session.get('video_decision',''),
'audio_decision': session.get('audio_decision',''), 'audio_decision': session.get('audio_decision',''),
'subtitle_decision': session.get('subtitle_decision',''),
'quality_profile': session.get('quality_profile',''),
'optimized_version': session.get('optimized_version',''),
'stream_local': session.get('local', ''),
'stream_location': session.get('location', ''),
'stream_bandwidth': session.get('bandwidth', ''),
'stream_container': session.get('stream_container', ''),
'stream_bitrate': session.get('stream_bitrate', ''),
'stream_aspect_ratio': session.get('stream_aspect_ratio', ''),
'stream_video_codec': session.get('stream_video_codec', ''),
'stream_video_bitrate': session.get('stream_video_bitrate', ''),
'stream_video_framerate': session.get('stream_video_framerate', ''),
'stream_video_resolution': session.get('stream_video_resolution', ''),
'stream_video_height': session.get('stream_height', ''),
'stream_video_width': session.get('stream_width', ''),
'stream_video_language': session.get('stream_video_language', ''),
'stream_video_language_code': session.get('stream_video_language_code', ''),
'stream_audio_bitrate': session.get('stream_audio_bitrate', ''),
'stream_audio_bitrate_mode': session.get('stream_audio_bitrate_mode', ''),
'stream_audio_codec': session.get('stream_audio_codec', ''),
'stream_audio_channels': session.get('stream_audio_channels', ''),
'stream_audio_language': session.get('stream_audio_language', ''),
'stream_audio_language_code': session.get('stream_audio_language_code', ''),
'stream_subtitle_codec': session.get('stream_subtitle_codec', ''),
'stream_subtitle_container': session.get('stream_subtitle_container', ''),
'stream_subtitle_format': session.get('stream_subtitle_format', ''),
'stream_subtitle_language': session.get('stream_subtitle_language', ''),
'stream_subtitle_language_code': session.get('stream_subtitle_language_code', ''),
'stream_subtitle_location': session.get('stream_subtitle_location', ''),
'transcode_container': session.get('transcode_container',''), 'transcode_container': session.get('transcode_container',''),
'transcode_video_codec': session.get('transcode_video_codec',''), 'transcode_video_codec': session.get('transcode_video_codec',''),
'transcode_video_width': session.get('transcode_width',''), 'transcode_video_width': session.get('transcode_width',''),
'transcode_video_height': session.get('transcode_height',''), 'transcode_video_height': session.get('transcode_height',''),
'transcode_audio_codec': session.get('transcode_audio_codec',''), 'transcode_audio_codec': session.get('transcode_audio_codec',''),
'transcode_audio_channels': session.get('transcode_audio_channels',''), 'transcode_audio_channels': session.get('transcode_audio_channels',''),
'transcode_hardware': session.get('transcode_hardware',''),
'session_key': session.get('session_key',''), 'session_key': session.get('session_key',''),
'transcode_key': session.get('transcode_key',''), 'transcode_key': session.get('transcode_key',''),
'session_id': session.get('session_id',''),
'user_id': session.get('user_id',''), 'user_id': session.get('user_id',''),
'machine_id': session.get('machine_id',''), 'machine_id': session.get('machine_id',''),
# Metadata parameters # Source metadata parameters
'media_type': metadata['media_type'], 'media_type': metadata['media_type'],
'container': session.get('container', media_info.get('container','')), 'container': session.get('container', media_info.get('container','')),
'aspect_ratio': session.get('aspect_ratio', media_info.get('aspect_ratio','')),
'video_codec': session.get('video_codec', media_info.get('video_codec','')), 'video_codec': session.get('video_codec', media_info.get('video_codec','')),
'video_bitrate': session.get('bitrate', media_info.get('bitrate','')), 'video_bitrate': session.get('bitrate', media_info.get('bitrate','')),
'video_framerate': session.get('video_framerate', media_info.get('video_framerate','')),
'video_resolution': session.get('video_resolution', media_info.get('video_resolution','')),
'video_width': session.get('width', media_info.get('width','')), 'video_width': session.get('width', media_info.get('width','')),
'video_height': session.get('height', media_info.get('height','')), 'video_height': session.get('height', media_info.get('height','')),
'video_resolution': session.get('video_resolution', media_info.get('video_resolution','')),
'video_framerate': session.get('video_framerate', media_info.get('video_framerate','')),
'aspect_ratio': session.get('aspect_ratio', media_info.get('aspect_ratio','')),
'audio_codec': session.get('audio_codec', media_info.get('audio_codec','')), 'audio_codec': session.get('audio_codec', media_info.get('audio_codec','')),
'audio_channels': session.get('audio_channels', media_info.get('audio_channels','')), 'audio_channels': session.get('audio_channels', media_info.get('audio_channels','')),
'title': full_title, 'title': full_title,

View file

@ -967,11 +967,6 @@ class PmsConnect(object):
media_info_list = [] media_info_list = []
media_items = metadata_main.getElementsByTagName('Media') media_items = metadata_main.getElementsByTagName('Media')
for item in media_items: for item in media_items:
if helpers.get_xml_attr(item, 'optimizedForStreaming'):
optimized_version = 1
else:
optimized_version = 0
media_info = {'id': helpers.get_xml_attr(item, 'id'), media_info = {'id': helpers.get_xml_attr(item, 'id'),
'container': helpers.get_xml_attr(item, 'container'), 'container': helpers.get_xml_attr(item, 'container'),
'bitrate': helpers.get_xml_attr(item, 'bitrate'), 'bitrate': helpers.get_xml_attr(item, 'bitrate'),
@ -984,8 +979,7 @@ class PmsConnect(object):
'audio_codec': helpers.get_xml_attr(item, 'audioCodec'), 'audio_codec': helpers.get_xml_attr(item, 'audioCodec'),
'audio_channels': helpers.get_xml_attr(item, 'audioChannels'), 'audio_channels': helpers.get_xml_attr(item, 'audioChannels'),
'file': helpers.get_xml_attr(item.getElementsByTagName('Part')[0], 'file'), 'file': helpers.get_xml_attr(item.getElementsByTagName('Part')[0], 'file'),
'file_size': helpers.get_xml_attr(item.getElementsByTagName('Part')[0], 'size'), 'file_size': helpers.get_xml_attr(item.getElementsByTagName('Part')[0], 'size')
'optimized_version': optimized_version
} }
media_info_list.append(media_info) media_info_list.append(media_info)
@ -1221,7 +1215,8 @@ class PmsConnect(object):
'transcode_protocol': helpers.get_xml_attr(transcode_info, 'protocol'), 'transcode_protocol': helpers.get_xml_attr(transcode_info, 'protocol'),
'transcode_hardware': transcode_hardware, 'transcode_hardware': transcode_hardware,
'audio_decision': helpers.get_xml_attr(transcode_info, 'audioDecision'), 'audio_decision': helpers.get_xml_attr(transcode_info, 'audioDecision'),
'video_decision': helpers.get_xml_attr(transcode_info, 'videoDecision') 'video_decision': helpers.get_xml_attr(transcode_info, 'videoDecision'),
'subtitle_decision': helpers.get_xml_attr(transcode_info, 'subtitleDecision')
} }
else: else:
transcode_details = {'transcode_key': '', transcode_details = {'transcode_key': '',
@ -1237,7 +1232,8 @@ class PmsConnect(object):
'transcode_protocol': '', 'transcode_protocol': '',
'transcode_hardware': 0, 'transcode_hardware': 0,
'audio_decision': 'direct play', 'audio_decision': 'direct play',
'video_decision': 'direct play' 'video_decision': 'direct play',
'subtitle_decision': ''
} }
# Figure out which version is being played # Figure out which version is being played
@ -1267,7 +1263,7 @@ class PmsConnect(object):
video_details = {'stream_video_bitrate': helpers.get_xml_attr(video_stream_info, 'bitrate'), video_details = {'stream_video_bitrate': helpers.get_xml_attr(video_stream_info, 'bitrate'),
'stream_video_language': helpers.get_xml_attr(video_stream_info, 'language'), 'stream_video_language': helpers.get_xml_attr(video_stream_info, 'language'),
'stream_video_language_code': helpers.get_xml_attr(video_stream_info, 'languageCode'), 'stream_video_language_code': helpers.get_xml_attr(video_stream_info, 'languageCode'),
'stream_video_decision': helpers.get_xml_attr(video_stream_info, 'decision') 'stream_video_decision': helpers.get_xml_attr(video_stream_info, 'decision') or 'direct play'
} }
if audio_stream_info: if audio_stream_info:
@ -1275,7 +1271,7 @@ class PmsConnect(object):
'stream_audio_bitrate_mode': helpers.get_xml_attr(audio_stream_info, 'bitrateMode'), 'stream_audio_bitrate_mode': helpers.get_xml_attr(audio_stream_info, 'bitrateMode'),
'stream_audio_language': helpers.get_xml_attr(audio_stream_info, 'language'), 'stream_audio_language': helpers.get_xml_attr(audio_stream_info, 'language'),
'stream_audio_language_code': helpers.get_xml_attr(audio_stream_info, 'languageCode'), 'stream_audio_language_code': helpers.get_xml_attr(audio_stream_info, 'languageCode'),
'stream_audio_decision': helpers.get_xml_attr(audio_stream_info, 'decision') 'stream_audio_decision': helpers.get_xml_attr(audio_stream_info, 'decision') or 'direct play'
} }
if subtitle_stream_info: if subtitle_stream_info:
@ -1297,19 +1293,37 @@ class PmsConnect(object):
else: else:
bif_thumb = '' bif_thumb = ''
# Check if it is an optimized version
if helpers.get_xml_attr(stream_media_parts_info, 'optimizedForStreaming'):
optimized_version = 1
else:
optimized_version = 0
# Get the quality profile
if video_details:
quality_profile = common.QUALITY_PROFILES.get(video_details['stream_video_bitrate'], 'Original')
else:
quality_profile = ''
transcode_decision = helpers.get_xml_attr(stream_media_parts_info, 'decision')
if transcode_decision == 'directplay':
transcode_decision = 'direct play'
# Check if it is an optimized version # Check if it is an optimized version
stream_details = {'stream_container': helpers.get_xml_attr(stream_media_info, 'container'), stream_details = {'stream_container': helpers.get_xml_attr(stream_media_info, 'container'),
'stream_bitrate': helpers.get_xml_attr(stream_media_info, 'bitrate'), 'stream_bitrate': helpers.get_xml_attr(stream_media_info, 'bitrate'),
'stream_aspect_ratio': helpers.get_xml_attr(stream_media_info, 'aspectRatio'),
'stream_audio_codec': helpers.get_xml_attr(stream_media_info, 'audioCodec'), 'stream_audio_codec': helpers.get_xml_attr(stream_media_info, 'audioCodec'),
'stream_audio_channels': helpers.get_xml_attr(stream_media_info, 'audioChannels'), 'stream_audio_channels': helpers.get_xml_attr(stream_media_info, 'audioChannels'),
'stream_video_codec': helpers.get_xml_attr(stream_media_info, 'videoCodec'), 'stream_video_codec': helpers.get_xml_attr(stream_media_info, 'videoCodec'),
'stream_video_resolution': helpers.get_xml_attr(stream_media_info, 'videoResolution'),
'stream_video_framerate': helpers.get_xml_attr(stream_media_info, 'videoFrameRate'), 'stream_video_framerate': helpers.get_xml_attr(stream_media_info, 'videoFrameRate'),
'stream_aspect_ratio': helpers.get_xml_attr(stream_media_info, 'aspectRatio'), 'stream_video_resolution': helpers.get_xml_attr(stream_media_info, 'videoResolution'),
'stream_height': helpers.get_xml_attr(stream_media_info, 'height'), 'stream_video_height': helpers.get_xml_attr(stream_media_info, 'height'),
'stream_width': helpers.get_xml_attr(stream_media_info, 'width'), 'stream_video_width': helpers.get_xml_attr(stream_media_info, 'width'),
'stream_duration': helpers.get_xml_attr(stream_media_info, 'duration'), 'stream_duration': helpers.get_xml_attr(stream_media_info, 'duration'),
'transcode_decision': helpers.get_xml_attr(stream_media_info, 'decision'), 'transcode_decision': transcode_decision,
'optimized_version': optimized_version,
'quality_profile': quality_profile,
'indexes': 1 if indexes == 'sd' else 0, 'indexes': 1 if indexes == 'sd' else 0,
'bif_thumb': bif_thumb, 'bif_thumb': bif_thumb,
'subtitles': 1 if subtitle_details else 0 'subtitles': 1 if subtitle_details else 0