Skip to content

Instantly share code, notes, and snippets.

@spaghetti-
Last active March 29, 2022 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spaghetti-/d605a964ae182b90bb20f3335fd7fdcd to your computer and use it in GitHub Desktop.
Save spaghetti-/d605a964ae182b90bb20f3335fd7fdcd to your computer and use it in GitHub Desktop.
rtorrent command syntax xmlrpc
To list all torrents in view 'main' and its tracker url we can chain commands like so:
# for testing
$ python3 -m rtorrent_xmlrpc scgi://localhost:16891/RPC2
d.multicall2 '' main d.name= d.size_bytes= d.creation_date= t.multicall=,t.url= f.multicall=,f.path=
d.multicall2 '' main d.name= d.size_bytes= d.creation_date= d.directory_base= t.multicall=,t.url=
from rtorrent_xmlrpc import SCGIServerProxy
server = SCGIServerProxy('scgi://localhost:16891/RPC2')
c = 'main d.name= d.size_bytes= d.creation_date= d.directory_base= t.multicall=,t.url='.split()
c.insert(0, '')
server.d.multicall2(*c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment