From a96482ee3ce4a257ffa7cd6467a50832e96f23b9 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 15 Aug 2015 14:37:27 +0200 Subject: [PATCH] New pause, resume and buffer notification options. Reworked notification config in settings menu. --- data/interfaces/default/css/plexpy.css | 2 +- .../default/notification_triggers_modal.html | 98 ++++++++ data/interfaces/default/settings.html | 211 +++++++++--------- plexpy/__init__.py | 33 ++- plexpy/config.py | 41 ++++ plexpy/monitor.py | 46 ++++ plexpy/notification_handler.py | 173 ++++++++++++-- plexpy/notifiers.py | 33 +++ plexpy/webserve.py | 26 ++- 9 files changed, 532 insertions(+), 131 deletions(-) create mode 100644 data/interfaces/default/notification_triggers_modal.html diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index 36ead7e8..da015f42 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -1368,7 +1368,7 @@ input[type="color"], } .stacked-configs > li > span > a.toggle-left { color: #444; - padding-right: 2px; + padding-right: 8px; } .stacked-configs > li > span > a:hover { color: #eee; diff --git a/data/interfaces/default/notification_triggers_modal.html b/data/interfaces/default/notification_triggers_modal.html new file mode 100644 index 00000000..666f008d --- /dev/null +++ b/data/interfaces/default/notification_triggers_modal.html @@ -0,0 +1,98 @@ +<%! +from plexpy import helpers +%> +% if data: + + +% endif diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index d53f0417..079adc06 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -5,6 +5,8 @@ from plexpy import notifiers available_notification_agents = notifiers.available_notification_agents() %> +<%def name="headIncludes()"> + <%def name="headerIncludes()"> @@ -79,7 +81,7 @@ available_notification_agents = notifiers.available_notification_agents()

Set your preferred time format. Click here to see the parameter list.

- +

@@ -127,7 +129,7 @@ available_notification_agents = notifiers.available_notification_agents()
- +

@@ -179,7 +181,7 @@ available_notification_agents = notifiers.available_notification_agents()

Current API key:
${config['api_key']}

- +

@@ -260,7 +262,7 @@ available_notification_agents = notifiers.available_notification_agents()

Refresh the user list when PlexPy starts.

- +

@@ -304,7 +306,7 @@ available_notification_agents = notifiers.available_notification_agents()

Click here to Import an existing Plexwatch database.

- +

@@ -359,7 +361,30 @@ available_notification_agents = notifiers.available_notification_agents()

- +
+

Buffer Warnings

+
+

Note: Buffer warnings only work on certain Plex clients. Android and PlexWeb do not report buffer events accurately or at all.

+
+ +
+
+ +
+
+

How many buffer events should we wait before triggering the first warning. Buffer events increment on each monitor ping if play state is buffering.

+
+
+ +
+
+ +
+
+

The value (in seconds) PlexPy should wait before triggering the next buffer warning. 0 to always trigger.

+
+ +

@@ -438,6 +463,40 @@ available_notification_agents = notifiers.available_notification_agents() +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • - +

    @@ -465,18 +541,18 @@ available_notification_agents = notifiers.available_notification_agents()

    Notification Agents

    - Toggle the desired notification option and configure it by selecting the settings icon to the right. - Watched notifications are only applicable for video items. + Toggle the desired notification options by clicking the bolt icon and configure it by selecting the settings icon to the right.