-
-
Save vor0nwe/e33ace72c850f93bc979 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
curl -u YOUR_ACCESS_TOKEN: \ | |
-X POST https://api.pushbullet.com/v2/pushes \ | |
--header 'Content-Type: application/json' \ | |
--data-binary "{\"type\":\"note\",\"title\":\"Downloaded\",\"body\":\"$TR_TORRENT_NAME: $TR_TIME_LOCALTIME\"}" | |
# | |
# Get YOUR_ACCESS_TOKEN from your account page at https://www.pushbullet.com/account | |
# | |
# Find transmission's settings.json, and update the following two lines | |
# | |
# "script-torrent-done-enabled": true, | |
# "script-torrent-done-filename": "/path/to/where/you/saved/this/gist/transmission-torrent-done.sh", | |
# |
Hey Sandra,
I had the same problem. Maybe the json was not parsing the file name correctly. I tried storing filename temporarily in another variable. I observed that the filename with spaces was problem somehow. So I replaced spaces with "_
" in the filename before "curl -u" statement. I did it like this: TR_TORRENT_NAME="${TR_TORRENT_NAME// /_}". Same thing with the $TR_TORRENT_NAME. Passing it was success and I got the correct notification.
Hi, not working for me.
I have script in ~Documents and have used GUI to set preferences.
I really want this to work.
Please help.
Ran sh in term. Error on Key. All working is Requires password. Key not enough. Added sandras fix also. Cheers to all.
Ok so scratch that. I'm encountering Sandra's issue with and without the super user article. What am I doing wrong? It must be a " or something simple.
Sorry about that, @ssandras and @andycarver101; I never got a notification about these comments.
Shell $VARIABLE expansion doesn’t work when you use single quotes. I’ve updated the gist to use double quotes instead (which means escaping all the JSON double quotes).
Thank you for this, it works great, however cannot get the torrent name and localtime. In the alert just shows up as below
$TR_TORRENT_NAME
$TR_TIME_LOCALTIME
Thanks,
Sandra