updating script name in satellite script

master
lance 9 years ago
parent 0639cbf57d
commit 710b19a241

@ -1,11 +1,13 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
This Python script auto-adds new torrents from Pushbullet notes if string starts with magnet:? This Python script auto-adds new torrents from Pushbullet pushes if string starts with magnet:?
and combs through transmission downloads and removes torrents when 100% fully downloaded. Great for keeping my and combs through transmission downloads to remove torrents when 100% fully downloaded. Great for keeping my
ISP off my back. Sends Pushbullet notes on torrent add/remove ISP off my back. Sends Pushbullet notes on torrent removal
Run this as a cron job on the same server as transmission Add the location to your path and run it as a cron job on the same server as transmission and let it do it's thing
*/5 * * * * /opt/pirate/thepirate-satellite
Learn more about PushBullet here: Learn more about PushBullet here:
pushbullet.com pushbullet.com
@ -20,7 +22,7 @@ import requests
from time import sleep from time import sleep
from os import path,system from os import path,system
# Put your API key into a text file # Put your Pushbullet API key here
api = 'xxxxxxxxxx' api = 'xxxxxxxxxx'
# Get rid of the SSL warnings # Get rid of the SSL warnings
@ -44,6 +46,6 @@ for torrent in t.get_torrents():
pushes = pb.get_pushes() pushes = pb.get_pushes()
for push in pushes[1]: for push in pushes[1]:
if push['body'].startswith('magnet:?'): if push['body'].startswith('magnet:?'):
system('/opt/pirate/pirate.py --file {}'.format(str(push['body']))) system('/opt/pirate/thepirate-satellite.py --file {}'.format(str(push['body'])))
pb.delete_push(push['iden']) pb.delete_push(push['iden'])

Loading…
Cancel
Save