Fix crashing when streaming clips

This commit is contained in:
JonnyWong16 2017-08-08 21:37:57 -07:00
parent 862c9cea87
commit 00e281dfb7

View file

@ -1506,7 +1506,7 @@ class PmsConnect(object):
# Get the quality profile
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'])
video_bitrate = helpers.cast_to_int(source_video_details.get('video_bitrate'))
try:
quailtiy_bitrate = min(b for b in common.QUALITY_PROFILES if stream_video_bitrate <= b <= video_bitrate)