From 32cf1ada8beef74fd371642a48a64a9c39cc9e7a Mon Sep 17 00:00:00 2001 From: Jonathan Wong Date: Tue, 20 Oct 2015 22:39:57 -0700 Subject: [PATCH] Add config settings for on_created * Note: on_created is recently added --- .../default/notification_triggers_modal.html | 11 ++++++ data/interfaces/default/settings.html | 26 +++++++++++-- plexpy/config.py | 17 +++++++- plexpy/notifiers.py | 39 ++++++++++++------- 4 files changed, 76 insertions(+), 17 deletions(-) diff --git a/data/interfaces/default/notification_triggers_modal.html b/data/interfaces/default/notification_triggers_modal.html index 666f008d..bbe798fc 100644 --- a/data/interfaces/default/notification_triggers_modal.html +++ b/data/interfaces/default/notification_triggers_modal.html @@ -57,6 +57,13 @@ from plexpy import helpers

Trigger notification when a media item triggers the defined buffer threshold.

+
+ +

Trigger notification when a media item is added to the Plex Media Server.

+
@@ -81,6 +88,7 @@ from plexpy import helpers console.log('success'); } }); + $('.toggle-notification-triggers-modal[data-id=' + configToggle + ']').addClass('active'); } else { var data = {}; data[$(this).data('config-name')] = 0; @@ -92,6 +100,9 @@ from plexpy import helpers console.log('success'); } }); + if (!($('.toggle-switches').is(":checked"))) { + $('.toggle-notification-triggers-modal[data-id=' + configToggle + ']').removeClass('active'); + } } }); diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 75873d0b..c15be036 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -515,7 +515,7 @@ available_notification_agents = notifiers.available_notification_agents() here to view usage information.


-