From 718049b9f33ebaa3f83f13b31eb5edf3c381cad2 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 11 Nov 2017 18:07:42 -0800 Subject: [PATCH] Add custom modifiers to notification text --- data/interfaces/default/notifier_config.html | 80 ++++++++++++-------- data/interfaces/default/settings.html | 51 +++++++++++++ plexpy/notification_handler.py | 43 ++++++++++- 3 files changed, 140 insertions(+), 34 deletions(-) diff --git a/data/interfaces/default/notifier_config.html b/data/interfaces/default/notifier_config.html index df2f4cff..c02a34ec 100644 --- a/data/interfaces/default/notifier_config.html +++ b/data/interfaces/default/notifier_config.html @@ -113,6 +113,7 @@
+

Select items that will trigger a notification for this ${notifier['agent_label']} notifiation agent.

@@ -129,6 +130,7 @@
+

Add custom notification conditions. Click here for a description of all the parameters. @@ -152,6 +154,7 @@

+

% if notifier['agent_name'] == 'scripts': Set the custom arguments passed to the script for each type of notification. @@ -160,6 +163,10 @@ % endif Click here for a list of available parameters which can be used.

+

+ You can also add text modifiers to change the case or slice parameters with a list of items. + Click here to view usage information. +

You can also add tags to exclude certain text depending on the media type. Click here to view usage information. @@ -219,48 +226,61 @@

-
-
-

- Test if ${notifier['agent_label']} notifications are working. Check the logs for troubleshooting. -

-

- Note: Test with the real values since parameters will not be substituted. - (i.e. Use "Game of Thrones" not {title}) -

- % if notifier['agent_name'] == 'scripts': -
- + +

+ Test if ${notifier['agent_label']} notifications are working. Check the logs for troubleshooting. +

+

+ Note: Test with the real values since parameters will not be substituted. + (i.e. Use "Game of Thrones" not {title}) +

+ % if notifier['agent_name'] == 'scripts': +
+ +
+
-

Choose the script to test.

-
- +
+

Choose the script to test.

+
+
+ +
+
-

Set custom arguments passed to the script.

- % else: -
- +
+

Set custom arguments passed to the script.

+
+ % else: +
+ +
+
-

Set a custom subject line.

-
- +
+

Set a custom subject line.

+
+
+ +
+
-

Set a custom body.

- % endif -
-
-
- -
-
+
+

Set a custom body.

+
+ % endif +
+
+
+
diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 7cc04507..fd16b1f5 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -1342,6 +1342,57 @@
+