Page 1 of 1

Script / Action on tracker status?

Posted: Sun Jul 13, 2014 7:12 pm
by Lazybones
Switching back and forth between clients I am looking for a way to replicate a script I had for transmission.

One of the trackers I am on has very specific tracker status errors for when a torrent has been pulled or when it is about to be retired. I had a script that automatically removed these torrents to free up seeding slots on this tracker..

Is there a way via CLI or script I could automate removing torrents that have specific words in the tracker status message?

Re: Script / Action on tracker status?

Posted: Sun Jul 13, 2014 11:45 pm
by Cas
I think this is essentially what you are looking for, it's very untested code but should help you :)

Code: Select all

core = component.get("Core")
def on_torrents_status(torrents):
    for torrent_id, status in torrents.items():
        if "Error" in status["tracker_status"]:
            core.remove_torrent(torrent_id)

core.get_torrents_status({}, ["tracker_status"]).addCallback(on_torrents_status)

Re: Script / Action on tracker status?

Posted: Mon Jul 14, 2014 12:51 am
by Lazybones
Thanks, ill give it a shot.