diff --git a/sickbeard/notifiers/pushbullet.py b/sickbeard/notifiers/pushbullet.py index 5f8bc65d932bfadc4a277bdd778d4497c9c5b094..745fcb31a315ff971cab54476c0c4c4c35a51c26 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}