From 5cd5c36d8cf7ae7617039b415769ab099825c903 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Wed, 23 May 2018 17:17:47 -0700 Subject: [PATCH] Actually add live notification parameter --- plexpy/notification_handler.py | 1 + plexpy/pmsconnect.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 78951084..a049e3d7 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -742,6 +742,7 @@ def build_media_notify_params(notify_action=None, session=None, timeline=None, m 'optimized_version': notify_params['optimized_version'], 'optimized_version_profile': notify_params['optimized_version_profile'], 'synced_version': notify_params['synced_version'], + 'live': notify_params['live'], 'stream_local': notify_params['local'], 'stream_location': notify_params['location'], 'stream_bandwidth': notify_params['bandwidth'], diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index e900826b..6e7140a4 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -1658,6 +1658,7 @@ class PmsConnect(object): 'optimized_version': int(helpers.get_xml_attr(stream_media_info, 'proxyType') == '42'), 'optimized_version_title': helpers.get_xml_attr(stream_media_info, 'title'), 'synced_version': 1 if sync_id else 0, + 'live': int(helpers.get_xml_attr(session, 'live') == '1'), 'indexes': int(indexes == 'sd'), 'bif_thumb': bif_thumb, 'subtitles': 1 if subtitle_id and subtitle_selected else 0 @@ -1721,7 +1722,6 @@ class PmsConnect(object): 'audio_channel_layout': common.AUDIO_CHANNELS.get(audio_channels, audio_channels), 'channel_icon': helpers.get_xml_attr(session, 'sourceIcon'), 'channel_title': helpers.get_xml_attr(session, 'sourceTitle'), - 'live': int(helpers.get_xml_attr(session, 'live') == '1'), 'extra_type': helpers.get_xml_attr(session, 'extraType'), 'sub_type': helpers.get_xml_attr(session, 'subtype') } @@ -1790,7 +1790,7 @@ class PmsConnect(object): next((p for p in source_media_part_streams if p['type'] == '3'), source_subtitle_details)) # Overrides for live sessions - if metadata_details.get('live') and transcode_session: + if stream_details['live'] and transcode_session: stream_details['stream_container_decision'] = 'transcode' stream_details['stream_container'] = transcode_details['transcode_container']