Skip to content

rTorrent configuration

While no rTorrent configuration is strictly required, some fields will only work correctly with configuration, and commands can be assigned to rTorrent functions for easy access.

Note

If you already have an existing rtorrent-ps/rtorrent-ps-ch configuration set up, you shouldn't need to make any changes to it.

Tip

To skip all the explanations and quickly generate a full config, run the following command:

pyroadmin -v config --create-rtorrent-rc

The full-featured rtorrent.rc used above is provided here. The configuration provided by pyrocore should still be compatible as well.

rTorrent installation

Any version of rTorrent >=0.9.6 is supported, however the efficiency improvements and JSON-RPC support that have been added to jesec/rtorrent make it highly recommended. If you prefer a nice TUI (among other quality-of-life fixes), consider rTorrent-PS as well.

Fields

Timestamps

This config records timestamps for use by the loaded, started, completed, last_xfer and last_active fields.

# loaded
method.set_key = event.download.inserted_new, !time_stamp,\
    "d.custom.set=tm_loaded,$cat=$system.time= ; d.save_resume="

# started
method.insert = pyro._tm_started.now, simple|private,\
    "d.custom.set=tm_started,$cat=$system.time= ; d.save_resume="
method.set_key = event.download.resumed, !time_stamp,\
    "branch=d.custom=tm_started,false=,pyro._tm_started.now="

# completed
method.insert = pyro._tm_completed.now, simple|private,\
    "d.custom.set=tm_completed,$cat=$system.time= ; d.save_resume="
method.set_key = event.download.finished, !time_stamp,\
    "pyro._tm_completed.now="
method.set_key = event.download.hash_done, !time_stamp,\
    "branch=\"and={d.complete=,not=$d.custom=tm_completed}\", pyro._tm_completed.now="

# active - This section is *not* needed for variants that implement `d.timestamp.last_active` natively (i.e. jesec/rtorrent)
method.insert = d.timestamp.last_active, simple, "if=$d.peers_connected=,$cat=$system.time=,$d.custom=last_active"
method.insert = d.timestamp.last_active.update, simple|private,\
    "d.custom.set=last_active,$cat=$system.time= ; branch=argument.0=,d.save_resume="
schedule2 = pyro_update_last_active, 24, 42,\
    "d.multicall2=started,\"branch=$d.peers_connected=,d.timestamp.last_active.update=\""
method.set_key = event.download.resumed, !last_active,\
    "branch=\"or={d.peers_connected=,not=$d.custom=last_active}\", d.timestamp.last_active.update=1"
method.set_key = event.download.finished, !last_active, "d.timestamp.last_active.update=1"

# last_xfer
method.insert.value = pyro.last_xfer.min_rate, 5000
method.insert = pyro._last_xfer_check_min_rate, simple|private,\
    "greater=argument.0=,pyro.last_xfer.min_rate="
method.insert = pyro._last_xfer_update, simple|private,\
    "d.custom.set=last_xfer,$cat=$system.time= ; branch=argument.0=,d.save_resume="
method.insert = d.last_xfer.is_active, simple,\
    "or={pyro._last_xfer_check_min_rate=$d.up.rate=,pyro._last_xfer_check_min_rate=$d.down.rate=}"
method.insert = d.timestamp.last_xfer, simple, "if=$d.last_xfer.is_active=,$cat=$system.time=,$d.custom=last_xfer"
schedule2 = pyro_update_last_xfer, 33, 17,\
    "d.multicall2=active,\"branch=$d.last_xfer.is_active=,pyro._last_xfer_update=\""

The following command can be used to backfill the data where possible:

# Remove the --dry-run to actually backfill the data.
pyroadmin backfill --dry-run
This is safe to run multiple times if needed.

UI

Searching

The following snippet allows for quick searching directly in the UI. The examples below can be modified to suit any searches you find yourself using often.

# VIEW: Use rtcontrol filter (^X s=KEYWORD, ^X t=TRACKER, ^X f="FILTER")
method.insert = s,simple|private,"execute.nothrow=rtcontrol,--detach,-qV,\"$cat=*,$argument.0=,*\""
method.insert = t,simple|private,"execute.nothrow=rtcontrol,--detach,-qV,\"$cat=\\\"alias=\\\",$argument.0=\""
method.insert = f,simple|private,"execute.nothrow=rtcontrol,--detach,-qV,$argument.0="