diff --git a/plexpy/config.py b/plexpy/config.py index 6810a693..8e27a7db 100644 --- a/plexpy/config.py +++ b/plexpy/config.py @@ -185,6 +185,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), @@ -320,4 +321,4 @@ class Config(object): """ for name, value in kwargs.items(): key, definition_type, section, ini_key, default = self._define(name) - self._config[section][ini_key] = definition_type(value) \ No newline at end of file + self._config[section][ini_key] = definition_type(value) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 2a6555e2..2e5836b0 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -845,6 +845,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 @@ -867,6 +868,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", @@ -893,10 +895,11 @@ 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') @@ -913,6 +916,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', @@ -1251,4 +1260,4 @@ class Email(object): } ] - return config_option \ No newline at end of file + return config_option