From f4273cafb67f1d1324a19e73204d8e199d229fab Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 5 Jul 2016 20:59:07 -0700 Subject: [PATCH] Add missing concurrent notifications for tracks --- plexpy/notification_handler.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index be9707ee..cc627eb8 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -305,6 +305,26 @@ def notify(stream_data=None, notify_action=None): notify_strings=notify_strings, metadata=metadata) + elif agent['on_concurrent'] and notify_action == 'concurrent': + # Build and send notification + notify_strings, metadata = build_notify_text(session=stream_data, + notify_action=notify_action, + agent_id=agent['id']) + + notifiers.send_notification(agent_id=agent['id'], + subject=notify_strings[0], + body=notify_strings[1], + script_args=notify_strings[2], + notify_action=notify_action, + metadata=metadata) + + # Set the notification state in the db + set_notify_state(session=stream_data, + notify_action=notify_action, + agent_info=agent, + notify_strings=notify_strings, + metadata=metadata) + elif stream_data['media_type'] == 'clip': pass else: