Fix crashing when streaming clips
This commit is contained in:
@@ -1506,7 +1506,7 @@ class PmsConnect(object):
|
|||||||
# Get the quality profile
|
# Get the quality profile
|
||||||
if media_type in ('movie', 'episode', 'clip') and 'stream_video_bitrate' in video_details:
|
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'])
|
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:
|
try:
|
||||||
quailtiy_bitrate = min(b for b in common.QUALITY_PROFILES if stream_video_bitrate <= b <= video_bitrate)
|
quailtiy_bitrate = min(b for b in common.QUALITY_PROFILES if stream_video_bitrate <= b <= video_bitrate)
|
||||||
|
Reference in New Issue
Block a user