From 0873beaed2475625234bed4b6b9d94252c92bd81 Mon Sep 17 00:00:00 2001 From: elseym Date: Sun, 24 Jan 2016 18:06:36 +0100 Subject: [PATCH 1/4] enable pushover html support by default, introduce option to deactivate --- plexpy/config.py | 1 + plexpy/notifiers.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plexpy/config.py b/plexpy/config.py index afe81bf8..fefd5c48 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -282,6 +282,7 @@ _CONFIG_DEFINITIONS = { 'PUSHBULLET_ON_INTUP': (int, 'PushBullet', 0), 'PUSHOVER_APITOKEN': (str, 'Pushover', ''), 'PUSHOVER_ENABLED': (int, 'Pushover', 0), + 'PUSHOVER_HTML_SUPPORT': (int, 'Pushover', 1), 'PUSHOVER_KEYS': (str, 'Pushover', ''), 'PUSHOVER_PRIORITY': (int, 'Pushover', 0), 'PUSHOVER_SOUND': (str, 'Pushover', ''), diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index a23f8b58..5b159cb3 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -1054,6 +1054,7 @@ class PUSHOVER(object): self.keys = plexpy.CONFIG.PUSHOVER_KEYS self.priority = plexpy.CONFIG.PUSHOVER_PRIORITY self.sound = plexpy.CONFIG.PUSHOVER_SOUND + self.html_support = plexpy.CONFIG.PUSHOVER_HTML_SUPPORT def conf(self, options): return cherrypy.config['config'].get('Pushover', options) @@ -1069,6 +1070,7 @@ class PUSHOVER(object): 'title': event.encode("utf-8"), 'message': message.encode("utf-8"), 'sound': plexpy.CONFIG.PUSHOVER_SOUND, + 'html': plexpy.CONFIG.PUSHOVER_HTML_SUPPORT, 'priority': plexpy.CONFIG.PUSHOVER_PRIORITY} http_handler.request("POST", @@ -1095,11 +1097,12 @@ class PUSHOVER(object): # For uniformity reasons not removed return - def test(self, keys, priority, sound): + def test(self, keys, priority, sound, html_support): self.enabled = True self.keys = keys self.priority = priority self.sound = sound + self.html_support = html_support self.notify('Main Screen Activate', 'Test Message') @@ -1151,6 +1154,12 @@ class PUSHOVER(object): 'description': 'Set the notification sound. Leave blank for the default sound.', 'input_type': 'select', 'select_options': self.get_sounds() + }, + {'label': 'Enable HTML Support', + 'value': self.html_support, + 'name': 'pushover_html_support', + 'description': 'Style your messages using these HTML Tags: b, i, u, a[href], font[color]', + 'input_type': 'checkbox' } ] From 2f2cb8386b46ae4550c8742d8c4dd2e363ea4f50 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 21 Feb 2016 20:41:18 -0800 Subject: [PATCH 2/4] Change wording for enable posters in notification help text --- data/interfaces/default/settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 3a3b5b02..da399148 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -717,7 +717,7 @@ available_notification_agents = sorted(notifiers.available_notification_agents() -

Allow PlexPy to upload Plex poster to Imgur for notifications.

+

Enable to upload Plex posters to Imgur for notifications. Disable if posters are not being used to save bandwidth.

From 6860e348dcd4141adce927fad1df97c46c27df0d Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 21 Feb 2016 22:59:27 -0800 Subject: [PATCH 3/4] Fix typo in setting recently added notification state --- plexpy/notification_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index cf5a15df..62c83e43 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -269,7 +269,7 @@ def notify_timeline(timeline_data=None, notify_action=None): metadata=metadata) # Set the notification state in the db - set_notify_state(session=stream_data, + set_notify_state(session=timeline_data, notify_action=notify_action, agent_info=agent, notify_strings=notify_strings, From a58b2e20388773f273f0428ff405a431394880d4 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 21 Feb 2016 23:06:22 -0800 Subject: [PATCH 4/4] v1.3.9 --- CHANGELOG.md | 8 +++++++- plexpy/version.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d94d8b8..b7923dd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v1.3.9 (2016-02-21) + +* Fix: Recently added notification not sent to all notification agents. +* Add: Pushover HTML support. (Thanks @elseym) + + ## v1.3.8 (2016-02-21) * Fix: Regression unable to clear HTTP password. @@ -31,7 +37,7 @@ * Add: Schedule background task to backup the PlexPy database. * Add: URL anonymizer for external links. * Add: Plex Media Scanner log file to Log viewer. -* Add: API v2 (sill very experimental) (Thanks @Hellowlol) +* Add: API v2 (sill very experimental). (Thanks @Hellowlol) * Change: Allow secure websocket connections. * Change: History grouping now accounts for the view offset. * Change: Subject line can be toggled off for Facebook, Slack, Telegram, and Twitter. diff --git a/plexpy/version.py b/plexpy/version.py index 631ee18e..fa9d3c56 100644 --- a/plexpy/version.py +++ b/plexpy/version.py @@ -1,2 +1,2 @@ PLEXPY_VERSION = "master" -PLEXPY_RELEASE_VERSION = "1.3.8" +PLEXPY_RELEASE_VERSION = "1.3.9"