From d6602578e519c7324d5611a726e5d24f2ad4ab34 Mon Sep 17 00:00:00 2001 From: rossdargan Date: Mon, 12 Oct 2015 11:53:41 +0100 Subject: [PATCH] Fix merge issues --- plexpy/config.py | 1 + plexpy/notifiers.py | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/plexpy/config.py b/plexpy/config.py index 3c08a463..88359648 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -194,6 +194,7 @@ _CONFIG_DEFINITIONS = { 'PUSHOVER_ENABLED': (int, 'Pushover', 0), 'PUSHOVER_KEYS': (str, 'Pushover', ''), 'PUSHOVER_PRIORITY': (int, 'Pushover', 0), + 'PUSHOVER_SOUND': (str, 'Pushover', ''), 'PUSHOVER_ON_PLAY': (int, 'Pushover', 0), 'PUSHOVER_ON_STOP': (int, 'Pushover', 0), 'PUSHOVER_ON_PAUSE': (int, 'Pushover', 0), diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index d00507b9..4a3fdbc6 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -865,6 +865,7 @@ class PUSHOVER(object): self.enabled = plexpy.CONFIG.PUSHOVER_ENABLED self.keys = plexpy.CONFIG.PUSHOVER_KEYS self.priority = plexpy.CONFIG.PUSHOVER_PRIORITY + self.sound = plexpy.CONFIG.PUSHOVER_SOUND self.on_play = plexpy.CONFIG.PUSHOVER_ON_PLAY self.on_stop = plexpy.CONFIG.PUSHOVER_ON_STOP self.on_watched = plexpy.CONFIG.PUSHOVER_ON_WATCHED @@ -887,6 +888,7 @@ class PUSHOVER(object): 'user': plexpy.CONFIG.PUSHOVER_KEYS, 'title': event, 'message': message.encode("utf-8"), + 'sound': plexpy.CONFIG.PUSHOVER_SOUND, 'priority': plexpy.CONFIG.PUSHOVER_PRIORITY} http_handler.request("POST", @@ -913,11 +915,12 @@ class PUSHOVER(object): #For uniformity reasons not removed return - def test(self, keys, priority): + def test(self, keys, priority, sound): self.enabled = True self.keys = keys self.priority = priority - + self.sound = sound + self.notify('Main Screen Activate', 'Test Message') def return_config_options(self): @@ -933,6 +936,12 @@ class PUSHOVER(object): 'description': 'Set the priority (-2,-1,0,1 or 2).', 'input_type': 'number' }, + {'label': 'Sound', + 'value': self.sound, + 'name': 'pushover_sound', + 'description': 'Set the notification sound (choose from this list or leave blank for default)', + 'input_type': 'text' + }, {'label': 'Pushover API Token', 'value': plexpy.CONFIG.PUSHOVER_APITOKEN, 'name': 'pushover_apitoken', @@ -1329,7 +1338,7 @@ class IFTTT(object): config_option = [{'label': 'Ifttt Maker Channel Key', 'value': self.apikey, 'name': 'ifttt_key', - 'description': 'Your Ifttt key. You can get a key from here https://ifttt.com/maker', + 'description': 'Your Ifttt key. You can get a key from here', 'input_type': 'text' }, {'label': 'Ifttt event',