I thought I would post this script I put together to suit my needs.
Where I am based bandwidth costs quite a bit so after I have downloaded a torrent I want to remove the torrent straight away.
I share at a good rate while I am leeching but then don't want to let it seed for too long after that.
Anyway if anyone wants something like that I have put together a python script (others may want to update it as I'm not an experienced python coder).
Code: Select all
#get list of torrents
from deluge.ui.client import sclient
sclient.set_core_uri()
torrent_ids = sclient.get_session_state()
for id in torrent_ids:
t_state = str(sclient.get_torrent_status(id, ['state']).values())[2:-2]
t_id = [id]
seed = "Seeding"
if t_state == seed:
sclient.remove_torrent(t_id, False)
When it detects that a torrent is seeding it will remove the torrent from the manager.
Hope it's useful to someone else.