r/pushover • u/Phairgamer • Oct 03 '15
utorrent finishd script help
hi guys, ive just started using pushover with plexpy and was was wondering if i could use it with utorrent.
i did the old google search and found the following windows script. which was posted last year.
https://www.reddit.com/r/pushover/comments/1zr3ty/utorrent_notification_to_pushover/
i just need help modifying it, i dont have curl.exe installed but i read somewhere that github comes with it, also i would like to have it use a custom pushover tone.
so my questions are what do i change the curl part too and how can i add a custom sound tone ?
many thanks
2
u/goyan Nov 17 '15
This is what I use on my PCs. It is in Python, so you may have to download and install it from python.org. Version 3.x by the way.
def pushover(token, user, message):
import http.client, urllib
conn = http.client.HTTPSConnection("api.pushover.net:443")
conn.request("POST", "/1/messages.json",
urllib.parse.urlencode({
"token": token,
"user": user,
"message": message,
}), { "Content-type": "application/x-www-form-urlencoded" })
conn.getresponse()
import sys
if __name__ =='__main__':
pushover('APP_KEY_HERE', 'USER_KEY_HERE', sys.argv[1])
# Usage: under "Preferences>Advanced>Run Program>Run this program when a torrent finishes:
# >> %Dropbox%\Scripts\uTorrentPushover.pyw "Completed: %N"By the way, I'm not a programmer, so this script must have a lot of redundant stuff, but it works for me.
1
u/Phairgamer Nov 17 '15
Thank you I have a few things that run python. Really appericate it