Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2010 22:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/296333 to your computer and use it in GitHub Desktop.
Save anonymous/296333 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from deluge.ui.client import sclient
sclient.set_core_uri()
torrent_ids = sclient.get_session_state()
torrents = [sclient.get_torrent_status(id, ["name","paused","ratio","progress","eta"]) for id in torrent_ids]
torrents = sorted(torrents, key=lambda x: x["progress"])
for t in torrents: print t
#!/usr/bin/env python
import sys
from deluge.ui.client import sclient
sclient.set_core_uri()
sclient.add_torrent_magnets(sys.argv[1:], [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment