rtorrent-interface
Small interface against rtorrent which supports adding magnet links and viewing the progress of downloads with a website. Uses flask and python 3.
#Setup
-
Install a virtualenv for python3:
virtualenv /path/to/rtorrent-interface
-
Install all packages that are required:
/path/to/rtorrent-interface/bin/pip install -r requirements.txt
-
Copy
cfg/rtorrent-interface.cfg.dist
tocfg/rtorrent-interface.cfg
and configure it to point to the correct rtorrent path. You will need to set the scgi_local parameter inside you .rtorrent.rc file, eg:scgi_local = /path/to/where/you/want/your/socket.sock
-
Start the webinterface by running
./rtorrent-interface.py
Todo
- Be notified in some way when a torrent is finished
- Make sure that all necessary config options are set before starting up.
Via website
- Some kind of refresh token as described in http://stackoverflow.com/questions/26739167/jwt-json-web-token-automatic-prolongation-of-expiration
Done
- Some kind of authentication for clients
- Support for showing progress of torrents
- Support for showing list of torrents
- Add a torrent
XMLRPC API calls
Rtorrent works with hashes by default, which identify each download/torrent.
Call name | Parameters | What it does |
---|---|---|
download_list | none | Returns an array/list of all hashes that are in the main view. |
load_start | torrent_path/magnet_link | Loads the given path/magnet link and starts it. Always seems to return 0 |
load_start_verbose | See load_start | See load_start |
d.pause | hash | Pauses the given download |
d.resume | hash | Resumes a download, it's a good idea to call is_open before calling this. |
load | torrent_path/magnet_link | Does the same as load_start but doesn't start downloading the torrent. TODO: return values? |
load_verbose | See load | See load |
start | hash | Start the given download |
d.get_name | hash | Retrieve the name of the torrent with the given hash. Does not have anything to do with the name of the individual files in this torrent. |
d.get_completed_bytes | hash | Get the amount of bytes that are completed for the given torrent hash |
d.get_size_bytes | hash | Get the total size in bytes of the given torrent hash |