From 91e54c0364df98358a01436ee247a348775e88e1 Mon Sep 17 00:00:00 2001 From: Dustyn Gibson <miigotu@gmail.com> Date: Sun, 22 Nov 2015 16:44:47 -0800 Subject: [PATCH] Try to fix https://github.com/SickRage/sickrage-issues/issues/60 -- CANT REPRODUCE --- sickbeard/notifiers/pushbullet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sickbeard/notifiers/pushbullet.py b/sickbeard/notifiers/pushbullet.py index 5f8bc65d9..745fcb31a 100644 --- a/sickbeard/notifiers/pushbullet.py +++ b/sickbeard/notifiers/pushbullet.py @@ -75,16 +75,16 @@ class PushbulletNotifier(object): logger.log(u"Pushbullet message: %r" % message, logger.DEBUG) logger.log(u"Pushbullet api: %r" % pushbullet_api, logger.DEBUG) logger.log(u"Pushbullet devices: %r" % pushbullet_device, logger.DEBUG) - logger.log(u"Pushbullet notification type: %r" % 'note' if event else 'None', logger.DEBUG) + logger.log(u"Pushbullet notification type: %r" % ('note' if event else 'None'), logger.DEBUG) url = 'https://api.pushbullet.com/v2/%s' % ('devices', 'pushes')[event is not None] - data = json.dumps({ + data = None if not event else json.dumps({ 'title': event.encode('utf-8'), 'body': message.encode('utf-8'), 'device_iden': pushbullet_device.encode('utf-8'), 'type': 'note' - }) if event else None + }) method = 'GET' if data is None else 'POST' headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % pushbullet_api} -- GitLab