From e71e588a916fd9eb61a9760d73ef131f5338e59d Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Thu, 20 Apr 2017 23:28:11 -0700 Subject: [PATCH] Fix crash if session is missing stream_video_bitrate --- plexpy/pmsconnect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index 3e859c61..d21a4869 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -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'])