Fix crash if session is missing stream_video_bitrate

This commit is contained in:
JonnyWong16 2017-04-20 23:28:11 -07:00
parent beb8df9dda
commit e71e588a91

View file

@ -1475,7 +1475,7 @@ class PmsConnect(object):
source_subtitle_details = next((p for p in source_media_part_streams if p['id'] == subtitle_id), {})
# Get the quality profile
if media_type in ('movie', 'episode', 'clip'):
if media_type in ('movie', 'episode', 'clip') and 'stream_video_bitrate' in video_details:
stream_video_bitrate = helpers.cast_to_int(video_details['stream_video_bitrate'])
video_bitrate = helpers.cast_to_int(source_video_details['video_bitrate'])