diff --git a/couchpotato/core/notifications/pushover/__init__.py b/couchpotato/core/notifications/pushover/__init__.py index 949acc2b..d8d76b78 100644 --- a/couchpotato/core/notifications/pushover/__init__.py +++ b/couchpotato/core/notifications/pushover/__init__.py @@ -9,7 +9,6 @@ config = [{ { 'tab': 'notifications', 'name': 'pushover', - 'label': 'Pushover', 'options': [ { 'name': 'enabled', @@ -20,10 +19,6 @@ config = [{ 'name': 'user_key', 'description': 'Register on pushover.net to get one.' }, - { - 'name': 'app_token', - 'description': 'You can get one here.' - }, { 'name': 'priority', 'default': 0, diff --git a/couchpotato/core/notifications/pushover/main.py b/couchpotato/core/notifications/pushover/main.py index 6c406185..d531f2b6 100644 --- a/couchpotato/core/notifications/pushover/main.py +++ b/couchpotato/core/notifications/pushover/main.py @@ -1,14 +1,15 @@ -from couchpotato.core.helpers.encoding import toUnicode +from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification from httplib import HTTPSConnection -from urllib import urlencode log = CPLog(__name__) class Pushover(Notification): + app_token = 'YkxHMYDZp285L265L3IwH3LmzkTaCy' + def notify(self, message = '', data = {}): if self.isDisabled(): return @@ -16,7 +17,7 @@ class Pushover(Notification): data = { 'user': self.conf('user_key'), - 'token': self.conf('app_token'), + 'token': self.app_token, 'message': toUnicode(message), 'priority': self.conf('priority') } @@ -24,7 +25,7 @@ class Pushover(Notification): http_handler.request('POST', "/1/messages.json", headers = {'Content-type': 'application/x-www-form-urlencoded'}, - body = urlencode(data) + body = tryUrlencode(data) ) response = http_handler.getresponse()