Page 1 of 1

[Windows] Pushbullet Notifications

Posted: February 10th, 2015, 2:54 pm
by NovaPost
Hello,

I couldn't find a script to send Pushbullets on Windows, sabToPushBullet by spants didn't work. I played with it a bit and decided I may as well start from scratch for Windows. Then spotted Twitter Notification for Windows by mookydudz and modified his code to work with Pushbullet.

***Credits****
Mookydudz creator of [Windows] Twitter Notifications

***Instructions***
The only thing you need is CURL for Windows which you can find here: http://curl.haxx.se/download.html

1. Put CURL in your SABnzbd folder or ensure it's in your PATH Enviroment variables in Windows. You could also alter CURL in the batch file to show its full path.

2. Open a text editor and copy & paste the following (Notepad will do) :

Code: Select all

REM - Sabnzbd PushBullet post-processing script for Windows
REM - Add your api key and the deviceid of the device to receive the notifcation below. Leave blank to send to all devices.

CLS

SET api=
SET deviceid=

SET status=%7
SET zero=0
SET filename=%3
SET filename=%filename: ="%
IF %status% EQU %zero% (GOTO :SUCCESS) ELSE (GOTO :FAIL)
:SUCCESS
SET title=Sabnzbd - Download Successfull
SET msg=Sabnzbd - Successfully downloaded %filename%
curl https://api.pushbullet.com/api/pushes -u "%api%": -d device_iden="%deviceid%" -d type=note -d title="%title%" -d body="%msg%" -X POST -k -s -S
EXIT
:FAIL
SET title=Sabnzbd - Download Failed
SET msg=Sabnzbd - Failed to download %filename%
curl https://api.pushbullet.com/api/pushes -u "%api%": -d device_iden="%deviceid%" -d type=note -d title="%title%" -d body="%msg%" -X POST -k -s -S
EXIT
3. Add your api key after "api=" and the deviceid of the device you want to send the Pushbullet to after "deviceid=". If you want to send to all devices leave it blank.

4. Save as "sabPushbulletWin.bat" in your post-processing script folder.

5. Assign it to a category, so it runs after your download has completed.

Re: [Windows] Pushbullet Notifications

Posted: August 31st, 2015, 8:53 pm
by blun7
So simple and works great! Much thx

Re: [Windows] Pushbullet Notifications

Posted: September 1st, 2015, 1:23 am
by shypike
PushBullet support will be in release 0.8.0

Re: [Windows] Pushbullet Notifications

Posted: September 1st, 2015, 8:57 am
by blun7
shypike wrote:PushBullet support will be in release 0.8.0
Great news!

Re: [Windows] Pushbullet Notifications

Posted: September 24th, 2015, 4:00 am
by scope
@shypike: Pushbullet support works fine in the latest Beta, however, and Im not sure if it is by design, if you are checking the nzb before downloading a ("Check before download" option) the notification is added twice ("SABnzbd: Added NZB"), I am assuming this is one for when it is actually added (and checked), and once it has passed checking and starts the actual download.. I think it would be better if we only got the notification once - when adding it to SABnzbd.

Other than that, great news and great implementation. :)

Re: [Windows] Pushbullet Notifications

Posted: September 24th, 2015, 4:19 am
by scope
actually there is one more thing.. It seems to ignore the device id and send the notification to all devices.. I have compared it to CP and with Sabnzbd I get the notification on both my mobile and desktop, with CP I only get it on my phone.. I have the same Device ID set in the configuration.

Re: [Windows] Pushbullet Notifications

Posted: September 24th, 2015, 5:13 am
by shypike
scope wrote: the notification is added twice ("SABnzbd: Added NZB"),
That will be fixed. Probably happens for all services, not just PushBullet.

Re: [Windows] Pushbullet Notifications

Posted: September 24th, 2015, 5:16 am
by shypike
scope wrote:actually there is one more thing.. It seems to ignore the device id and send the notification to all devices.. I have compared it to CP and with Sabnzbd I get the notification on both my mobile and desktop, with CP I only get it on my phone.. I have the same Device ID set in the configuration.
Which program does it the right way?

Re: [Windows] Pushbullet Notifications

Posted: September 24th, 2015, 5:20 am
by scope
shypike wrote:
scope wrote:actually there is one more thing.. It seems to ignore the device id and send the notification to all devices.. I have compared it to CP and with Sabnzbd I get the notification on both my mobile and desktop, with CP I only get it on my phone.. I have the same Device ID set in the configuration.
Which program does it the right way?
CP=Couch Potato.. I've got both set up to use Pushbullet and CP seems to use the device ID, where as Sabnzbd seems to ignore it.