Pushbullet: add device-id
Pushbullet: add device-id
When using Sonarr and Radarr I can setup a specific device-id for pushbullet-notifications. Is it possible to add this feature to SABnzbd?
Re: Pushbullet: add device-id
Below is the SAB code. I see 'device', but AFAIK is not filled out. Could that be the device-id? Do you run from source?
Code: Select all
def send_pushbullet(title, msg, gtype, force=False, test=None):
""" Send message to Pushbullet """
if test:
apikey = test.get('pushbullet_apikey')
device = test.get('pushbullet_device')
else:
apikey = sabnzbd.cfg.pushbullet_apikey()
device = sabnzbd.cfg.pushbullet_device()
if not apikey:
return T('Cannot send, missing required data')
title = u'SABnzbd: ' + Tx(NOTIFICATION.get(gtype, 'other'))
try:
conn = httplib.HTTPSConnection('api.pushbullet.com:443')
conn.request('POST', '/v2/pushes',
json.dumps({
'type': 'note',
'device': device,
'title': title,
'body': msg}),
headers={'Authorization': 'Bearer ' + apikey,
'Content-type': 'application/json'})
res = conn.getresponse()
if res.status != 200:
logging.error(T('Bad response from Pushbullet (%s): %s'), res.status, res.read())
else:
logging.info('Successfully sent to Pushbullet')
except:
logging.warning(T('Failed to send pushbullet message'))
logging.info('Traceback: ', exc_info=True)
return T('Failed to send pushbullet message')
return ''
Re: Pushbullet: add device-id
When device is empty it will send a notification to all devices (that is the default behavior for pushbullet).
I don't understand 'do you run from source'. I run SABnzbd on my Synology.
I don't understand 'do you run from source'. I run SABnzbd on my Synology.
Re: Pushbullet: add device-id
It was disabled, but not sure why: https://github.com/sabnzbd/sabnzbd/comm ... 7fed1b0606
I recommend that you instead use the Notification Script NZB-Notify https://github.com/caronc/nzb-notify
He supports the device ID and many more services, if you ever need them
I recommend that you instead use the Notification Script NZB-Notify https://github.com/caronc/nzb-notify
He supports the device ID and many more services, if you ever need them
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Pushbullet: add device-id
That one is new for me. Thanks, I will give it a try.
Re: Pushbullet: add device-id
It was disabled because it's not what people expect it to be.
It's not like "John's iPhone", but some internal ID.
You cannot lookup the IDs and the friendly names on the PushBullet website.
You need to do several API queries before you can show a selection list.
I didn't want to spend so much effort on it.
It's not like "John's iPhone", but some internal ID.
You cannot lookup the IDs and the friendly names on the PushBullet website.
You need to do several API queries before you can show a selection list.
I didn't want to spend so much effort on it.
Re: Pushbullet: add device-id
nzb-notify works great. Thanks!