RTorrentCommands

Commands

This is a list of commands supported by rTorrent. Under each command, its parameters are listed, where Bold means it is required and italic that it is optional. Commands that are italic are nor available through XMLRPC. See RTorrentCommandsRaw for a complete list.

System system.listMethods Returns a list of all available commands. system.client_version system.library_version Returns the client or library version. system.pid

Returns the process id. system.hostname Returns the hostname. system.get_cwd system.set_cwd, cwd = directory Change the current working directory using the chdir system call.

system.set_umask = numask Set the process's file mode creation mask to numask through the umask system call. Generic download_list = view

view</dt><dd> Select the view to use. An empty string equals "default". </dd></dl> Returns a list of the info-hashes of downloads in <i>view', encoded in capital letter hexadecimal. </i> <h3 id="execute_loglog_file">execute_log = log_file Log the output of commands called by "execute" to log_file. If no parameter is passed, then logging is disabled. <h3 id="loadload_verboseload_rawload_raw_startload_raw_verboseload_startload_start_verboseurifiledata">load, load_verbose, load_raw, load_raw_start, load_raw_verbose, load_start, load_start_verbose = [uri|file|data], &hellip;

<dl><dt>[uri|file|data]</dt><dd> A string either representing an URI, file path including '*' as wildcards, or raw torrent data. </dd></dl> <dl><dt>&hellip;</dt><dd> Any number of download commands to be called upon successful creation of the torrent. These will be called before the torrent is started. </dd></dl> Load a torrent and call download commands once done. Creation of the torrent is done lazily, thus no download is created during this call. <ul><li>verbose Print error messages to the log. </li><li>raw The argument passed is the raw torrent data to be loaded. </li><li>start Start the torrent.

</li></ul><h3 id="close_on_ratiomin_ratiomin_uploadmax_ratio">close_on_ratio = min_ratio, min_upload, max_ratio, &hellip; <h3 id="stop_on_ratiomin_ratiomin_uploadmax_ratio">stop_on_ratio = min_ratio, min_upload, max_ratio, &hellip; <dl><dt>&hellip;</dt><dd> Any number of commands to be executed on the stopped/closed torrent. </dd></dl> Stop/Close torrents when they reach the given upload ratio

min_ratio in percent. If the optional min_upload is given, require a total upload amount of this many bytes as well. If the optional max_ratio is given, stop the torrent when reaching this ratio regardless of the total upload amount. Exclude certain torrent by pressing Shift+I in the downlist list. Intended for use with the schedule option. stop_on_ratio = 100, 20M, 300, d.erase=

<h3 id="get_check_hash">get_check_hash <h3 id="set_check_hashcheck_hashtrue">set_check_hash, check_hash = true Perform hash check on torrents that have finished downloading. <h3 id="get_directory">get_directory <h3 id="set_directorydirectory.">set_directory, directory = "./"

Set the default download directory for newly loaded torrents. <h3 id="get_name">get_name <h3 id="set_namesessionname">set_name = "session name" Name of this rtorrent session, for display in the main title or XMLRPC clients. <h3 id="get_session">get_session <h3 id="set_sessionsession">set_session, session = ""

Session management will be enabled and the torrent files for all open downloads will be stored in this directory. Only one instance of rtorrent can be used per session directory. An empty string will disable the session directory. <h1 id="Network">Network encryption = &hellip; Set how rtorrent should deal with encrypted Bittorrent connections. By default, encryption is disabled, equivalent to specifying the option none. Alternatively, any number of the following options may be specified: <ul><li>allow_incoming (allow incoming encrypted connections) </li><li>try_outgoing (use encryption for outgoing connections)

</li><li>require (disable unencrypted handshakes) </li><li>require_RC4 (also disable plaintext transmission after the initial encrypted handshake) </li><li>enable_retry (if the initial outgoing connection fails, retry with encryption turned on if it was off or off if it was on) </li><li>prefer_plaintext (choose plaintext when peer offers a choice between plaintext transmission and RC4 encryption, otherwise RC4 will be used) </li></ul><h3 id="get_bind">get_bind <h3 id="set_bindbind0.0.0.0example.com">set_bind, bind = ["0.0.0.0"|"example.com"]

Bind listening socket and outgoing connections to this network interface address. <h3 id="get_http_proxy">get_http_proxy <h3 id="set_http_proxyhttp_proxyhttp:example.com">set_http_proxy, http_proxy = "http://example.com" Use a http proxy. Disable with an empty string. <h3 id="get_ip">get_ip <h3 id="set_ipip0.0.0.0example.com">set_ip, ip = ["0.0.0.0"|"example.com"]

Set the address reported to the tracker. <h3 id="get_random_open">get_random_open <h3 id="set_random_openport_randomtrue">set_random_open, port_random = true If set, when opening the listening port a random port in port_range will be selected. Else the lowest available in the range will be used. <h3 id="get_port_range">get_port_range

<h3 id="set_port_rangeport_rangerange">set_port_range, port_range = range <dl><dt> range = "6881-6999"</dt><dd> Port numbers in the range &lt;0,216&gt;, as a string. </dd></dl> Set the port range that may be used for the listening port.

<h1 id="User-Interface">User-Interface <h3 id="view_addname">view_add = name Create a new view. <h3 id="view_sortname">view_sort = name <h3 id="view_sortnameseconds">view_sort = name,seconds Sort a view according the the criteria set by view_sort_current. If the optional argument is supplied, the view is not sorted if a change happened during the last seconds. This command is meant to be used with schedule. <h3 id="view_sort_newname">view_sort_new = name,&hellip; <h3 id="view_sort_currentname">view_sort_current = name,&hellip;

Set the  sorting  criteria  for  when  new elements inserted or view_sort is called. The list can contain any number of  crite- ria, including zero, from the following: name, name_reverse,  stopped,  started,  complete,  incomplete, state_changed, state_changed_reverse <h3 id="view_filtername">view_filter = name,&hellip; Set a list of filter to apply when new new downloads are  added and when view_sort  is  called. All filters must match for the download to be included. stopped, started, complete, incomplete, <h3 id="get_key_layout">get_key_layout <h3 id="set_key_layoutkey_layoutqwertyazertyqwertzdvorak">set_key_layout, key_layout = [qwerty|azerty|qwertz|dvorak]

Change the key-bindings. <h1 id="Tools">Tools Various commands useful for scripting. cat = &hellip; Concatenate any number of object as a string. if = &hellip; A series of if/else statements. Every even arguments are conditionals and odd arguments are branches to be executed, except the last one which is always a branch.

if (cond1) { branch1 } &lt;cond1&gt;,&lt;branch1&gt;

if (cond1) { branch1 } else if (cond2) { branch2 } else { branch3 } &lt;cond1&gt;,&lt;branch1&gt;,&lt;cond2&gt;,&lt;branch2&gt;,&lt;branch3&gt;

<h1 id="Download">Download All download commands except d.multicall take the info-hash of the target download, encoded in capital letter hexadecimal, as the first argument. <h3 id="d.multicallcall_downloadview">d.multicall, call_download = view, &hellip; <dl><dt> view </dt><dd> Select the view to use. An empty string equals "default". </dd></dl> <dl><dt>&hellip;</dt><dd> Any number of download commands. Each command must contain '=', with optional arguments. </dd></dl>

Returns a list of lists, where each element is a list of result from calls on one download. &gt; xmlrpc localhost d.multicall "started" "d.get_name=" "d.get_size_chunks=" Array of 2 items: Index 0 Array of 2 items: Index 0 String: 'Forget-me-not c001.zip' Index 1 Integer: 26 Index 1 Array of 2 items: Index 0 String: 'Forget-me-not c002.zip' Index 1 Integer: 17 <h3 id="d.update_priorities">d.update_priorities Put any changes to file priorities into effect. This command is relatively expensive and should therefor be called after a batch of changes to priorities has been done. <h1 id="File">File All file commands take the info-hash of the target download, encoded in capital letter hexadecimal, as the first argument and the index of the file as the second. <h1 id="Tracker">Tracker

<h3 id="t.multicallinfo_hashdummy_argument">t.multicall = info_hash, dummy_argument, &hellip; See "d.multicall". <h3 id="t.get_group">t.get_group <h3 id="t.get_id">t.get_id <h3 id="t.get_type">t.get_type <h3 id="t.get_url">t.get_url <h3 id="t.get_min_interval">t.get_min_interval <h3 id="t.get_normal_interval">t.get_normal_interval

<h3 id="t.get_scrape_complete">t.get_scrape_complete <h3 id="t.get_scrape_downloaded">t.get_scrape_downloaded <h3 id="t.get_scrape_incomplete">t.get_scrape_incomplete <h3 id="t.get_scrape_time_last">t.get_scrape_time_last <h3 id="t.is_enabled">t.is_enabled <h3 id="t.set_enabledtruefalse">t.set_enabled = [true|false] <h3 id="t.is_open">t.is_open

External Links: http://libtorrent.rakshasa.no/wiki/RTorrentCommandsRaw