From ce8701f3cc97dca40d2a1d215357780edd79bda2 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 9 Oct 2011 15:01:14 +0200 Subject: [PATCH] Notifo notification --- couchpotato/core/notifications/notifo/__init__.py | 3 +-- couchpotato/core/notifications/notifo/main.py | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/couchpotato/core/notifications/notifo/__init__.py b/couchpotato/core/notifications/notifo/__init__.py index 7b2828d..ef9a46e 100644 --- a/couchpotato/core/notifications/notifo/__init__.py +++ b/couchpotato/core/notifications/notifo/__init__.py @@ -20,8 +20,7 @@ config = [{ 'name': 'username', }, { - 'name': 'password', - 'type': 'password', + 'name': 'api_key', }, ], } diff --git a/couchpotato/core/notifications/notifo/main.py b/couchpotato/core/notifications/notifo/main.py index d4ea1f3..c66044e 100644 --- a/couchpotato/core/notifications/notifo/main.py +++ b/couchpotato/core/notifications/notifo/main.py @@ -12,14 +12,12 @@ class Notifo(Notification): url = 'https://api.notifo.com/v1/send_notification' - def conf(self, attr): - return Env.setting(attr, 'notifo') - def notify(self, message = '', data = {}): if self.isDisabled(): return try: params = { + 'label': self.default_title, 'msg': toUnicode(message), } @@ -28,7 +26,7 @@ class Notifo(Notification): } handle = self.urlopen(self.url, params = params, headers = headers) - result = json.load(handle) + result = json.loads(handle) if result['status'] != 'success' or result['response_message'] != 'OK': raise Exception