Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@unapersona
Created August 10, 2012 09:26
Show Gist options
  • Star 25 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unapersona/3312877 to your computer and use it in GitHub Desktop.
Save unapersona/3312877 to your computer and use it in GitHub Desktop.
Pushover notification on Transmission file completed
#!/bin/sh
curl -s \
-F "token=APP_TOKEN" \
-F "user=USER_TOKEN" \
-F "title=Download Finished" \
-F "message=$TR_TORRENT_NAME: $TR_TIME_LOCALTIME" \
http://api.pushover.net/1/messages > /dev/null
@luisfra
Copy link

luisfra commented Dec 16, 2012

been trying to get this to work but i havent found a way! can you please make a readme with a how to! because i put the app token and user token and point transmission to the script and enable the script option but no notification is sent!

@d-d
Copy link

d-d commented Jul 23, 2013

To enable, put the script in a file transfinish.sh. Ensure it can be executed by doing "chmod 755 transfinish.sh"
Then add the following to your transmission config file, which is called settings.json:

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/path/to/where/you/saved/transfinish.sh",

Enjoy.

@threespoons
Copy link

Can someone tell me where I can find the app token and user token?

@talllguy
Copy link

@threespoons: sign up for pushover and then go to https://pushover.net/ Your token will be displayed on the pushover home page. The name is typically optional, but it is the device name, like "iPhone5"

@adamlazz
Copy link

This didn't work for me. I created an app, my shell script's permissions are 755, and Transmission's settings.json file is in ~/Library/Application Support/Transmission. Are there supposed to be curly braces around the two json lines? I've tried with and without.

@adamlazz
Copy link

This feature also appears in the GUI in the Preferences window under Transfers --> Management --> Call Script.

@kameron-1590
Copy link

what is the app token?

@hrywlms
Copy link

hrywlms commented Feb 10, 2016

Works perfectly, and is incredibly simple. Thanks so much!

@khurshid-alam
Copy link

Where does it get the value for $TR_TORRENT_NAME? env variables?

@georgemaxim
Copy link

georgemaxim commented Aug 14, 2017

Works GREAT! :)

you can add this line for custom sound:

-F "sound=cashregister" \ - Where cashregister is one of the sounds you can find here https://pushover.net/api#sounds

Thanks!

@WiteWulf
Copy link

WiteWulf commented May 9, 2018

Thanks for this, working perfectly on my QNAP

@pnotz17
Copy link

pnotz17 commented Apr 21, 2020

i just want transmission to play a sound i did exactly what the above stated and i didn't work any help??

@PN62323424
Copy link

PN62323424 commented Oct 2, 2021

#!/bin/bash
curl -s -F "token=aa4q6fcg7fuhjjkebhfw2picfzqf3t"
-F "user=u6sxap9vv7x41sg51612um8ua8zv3b"
-F "title=Torrent Done"
-F "message=$TR_TORRENT_NAME has been downloaded successfully on $TR_TIME_LOCALTIME"
https://api.pushover.net/1/messages.json

It took me a long time to find the solution, above is the script I am currently using if you need it. Another thing, remember to use notpad+ to convert the document format to unix first, and then change the encoding to UTF-8, otherwise it will prompt "! /bin/bash: not found", because if you change the .txt file to .sh file directly, it will not be executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment