diff --git a/gui/slick/js/configNotifications.js b/gui/slick/js/configNotifications.js index 342bec4f..847236c6 100644 --- a/gui/slick/js/configNotifications.js +++ b/gui/slick/js/configNotifications.js @@ -267,6 +267,7 @@ $(document).ready(function(){ function (data) { var devices = jQuery.parseJSON(data).devices; $("#pushbullet_device_list").html(''); + $("#pushbullet_device_list").append('') for (var i = 0; i < devices.length; i++) { if(devices[i].active == true) { if(current_pushbullet_device == devices[i].iden) { diff --git a/sickbeard/notifiers/pushbullet.py b/sickbeard/notifiers/pushbullet.py index fedf3fa2..64c24fed 100644 --- a/sickbeard/notifiers/pushbullet.py +++ b/sickbeard/notifiers/pushbullet.py @@ -79,13 +79,11 @@ class PushbulletNotifier: http_handler = HTTPSConnection("api.pushbullet.com") - authString = base64.encodestring('%s:' % (pushbullet_api)).replace('\n', '') - if notificationType == None: testMessage = True try: logger.log(u"Testing Pushbullet authentication and retrieving the device list.", logger.DEBUG) - http_handler.request(method, uri, None, headers={'Authorization': 'Basic %s:' % authString}) + http_handler.request(method, uri, None, headers={'Authorization': 'Bearer %s' % pushbullet_api}) except (SSLError, HTTPException, socket.error): logger.log(u"Pushbullet notification failed.", logger.ERROR) return False @@ -99,7 +97,7 @@ class PushbulletNotifier: 'type': notificationType} data = json.dumps(data) http_handler.request(method, uri, body=data, - headers={'Content-Type': 'application/json', 'Authorization': 'Basic %s' % authString}) + headers={'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % pushbullet_api}) pass except (SSLError, HTTPException, socket.error): return False