refactor: unify quarks and strings to snake_case (#7108)

* refactor: change `leftUntilDone` to `left_until_done`

* refactor: change `magnetLink` to `magnet_link`

* refactor: change `manualAnnounceTime` to `manual_announce_time`

* refactor: change `maxConnectedPeers` to `max_connected_peers`

* refactor: change `metadataPercentComplete` to `metadata_percent_complete`

* refactor: change `peersConnected` to `peers_connected`

* refactor: change `peersFrom` to `peers_from`

* refactor: change `peersGettingFromUs` to `peers_getting_from_us`

* refactor: change `peersSendingToUs` to `peers_sending_to_us`

* refactor: change `percentComplete` to `percent_complete`

* refactor: change `percentDone` to `percent_done`

* refactor: change `pieceCount` to `piece_count`

* refactor: use quark when possible

* refactor: change `pieceSize` to `piece_size`

* refactor: change `primary-mime-type` to `primary_mime_type`

* refactor: change `rateDownload` to `rate_download`

* refactor: change `rateUpload` to `rate_upload`

* refactor: change `recheckProgress` to `recheck_progress`

* refactor: change `secondsDownloading` to `seconds_downloading`

* refactor: change `secondsSeeding` to `seconds_seeding`

* refactor: change `sizeWhenDone` to `size_when_done`

* refactor: change `startDate` to `start_date`

* refactor: change `trackerStats` to `tracker_stats`

* refactor: change `totalSize` to `total_size`

* refactor: change `torrentFile` to `torrent_file`

* refactor: change `uploadedEver` to `uploaded_ever`

* refactor: change `uploadRatio` to `upload_ratio`

* refactor: change `webseedsSendingToUs` to `webseeds_sending_to_us`

* refactor: change `bytesCompleted` to `bytes_completed`

* refactor: change `clientName` to `client_name`

* refactor: change `clientIsChoked` to `client_is_choked`

* refactor: change `clientIsInterested` to `client_is_interested`

* refactor: change `flagStr` to `flag_str`

* refactor: change `isDownloadingFrom` to `is_downloading_from`

* refactor: change `isEncrypted` to `is_encrypted`

* refactor: change `isIncoming` to `is_incoming`

* refactor: change `isUploadingTo` to `is_uploading_to`

* refactor: change `isUTP` to `is_utp`

* refactor: change `peerIsChoked` to `peer_is_choked`

* refactor: change `peerIsInterested` to `peer_is_interested`

* refactor: change `rateToClient` to `rate_to_client`

* refactor: change `rateToPeer` to `rate_to_peer`

* refactor: change `fromCache` to `from_cache`

* refactor: change `fromDht` to `from_dht`

* refactor: change `fromIncoming` to `from_incoming`

* refactor: change `fromLpd` to `from_lpd`

* refactor: change `fromLtep` to `from_ltep`

* refactor: change `fromPex` to `from_pex`

* refactor: change `fromTracker` to `from_tracker`

* refactor: change `announceState` to `announce_state`

* refactor: change `downloadCount` to `download_count`

* refactor: change `hasAnnounced` to `has_announced`

* refactor: change `hasScraped` to `has_scraped`

* refactor: change `isBackup` to `is_backup`

* refactor: change `lastAnnouncePeerCount` to `last_announce_peer_count`

* refactor: change `lastAnnounceResult` to `last_announce_result`

* refactor: change `lastAnnounceStartTime` to `last_announce_start_time`

* refactor: change `lastAnnounceSucceeded` to `last_announce_succeeded`

* refactor: change `lastAnnounceTime` to `last_announce_time`

* refactor: change `lastAnnounceTimedOut` to `last_announce_timed_out`

* refactor: change `lastScrapeResult` to `last_scrape_result`

* refactor: change `lastScrapeStartTime` to `last_scrape_start_time`

* refactor: change `lastScrapeSucceeded` to `last_scrape_succeeded`

* refactor: change `lastScrapeTime` to `last_scrape_time`

* refactor: change `lastScrapeTimedOut` to `last_scrape_timed_out`

* refactor: change `leecherCount` to `leecher_count`

* refactor: change `nextAnnounceTime` to `next_announce_time`

* refactor: change `nextScrapeTime` to `next_scrape_time`

* refactor: change `scrapeState` to `scrape_state`

* refactor: change `seederCount` to `seeder_count`

* refactor: change `torrent-added` to `torrent_added`

* refactor: change `torrent-duplicate` to `torrent_duplicate`

* refactor: change `torrent-remove` to `torrent_remove`

* refactor: change `delete-local-data` to `delete_local_data`

* refactor: change `torrent-rename-path` to `torrent_rename_path`

* refactor: change `alt-speed-down` to `alt_speed_down`

* refactor: convert `pref_toggle_entries` to quark array

* refactor: change `alt-speed-enabled` to `alt_speed_enabled`

* refactor: change `compact-view` to `compact_view`

* refactor: change `sort-reversed` to `sort_reversed`

* refactor: change `show-filterbar` to `show_filterbar`

* refactor: change `show-statusbar` to `show_statusbar`

* refactor: change `show-toolbar` to `show_toolbar`

* refactor: change `alt-speed-time-begin` to `alt_speed_time_begin`

* refactor: change `alt-speed-time-day` to `alt_speed_time_day`

* refactor: change `alt-speed-time-end` to `alt_speed_time_end`

* refactor: change `alt-speed-up` to `alt_speed_up`

* refactor: change `alt-speed-time-enabled` to `alt_speed_time_enabled`

* refactor: change `blocklist-enabled` to `blocklist_enabled`

* refactor: change `blocklist-size` to `blocklist_size`

* refactor: change `blocklist-url` to `blocklist_url`

* refactor: change `cache-size-mb` to `cache_size_mb`

* refactor: change `config-dir` to `config_dir`

* refactor: change `default-trackers` to `default_trackers`

* refactor: change `dht-enabled` to `dht_enabled`

* refactor: change `download-dir-free-space` to `download_dir_free_space`

* refactor: change `download-queue-enabled` to `download_queue_enabled`

* refactor: change `download-queue-size` to `download_queue_size`

* refactor: change `idle-seeding-limit-enabled` to `idle_seeding_limit_enabled`

* refactor: change `idle-seeding-limit` to `idle_seeding_limit`

* refactor: change `incomplete-dir-enabled` to `incomplete_dir_enabled`

* refactor: change `incomplete-dir` to `incomplete_dir`

* refactor: change `lpd-enabled` to `lpd_enabled`

* refactor: change `peer-limit-global` to `peer_limit_global`

* refactor: change `peer-limit-per-torrent` to `peer_limit_per_torrent`

* refactor: change `peer-port-random-on-start` to `peer_port_random_on_start`

* refactor: change `peer-port` to `peer_port`

* refactor: change `pex-enabled` to `pex_enabled`

* refactor: change `port-forwarding-enabled` to `port_forwarding_enabled`

* refactor: change `queue-stalled-enabled` to `queue_stalled_enabled`

* refactor: change `queue-stalled-minutes` to `queue_stalled_minutes`

* refactor: change `rename-partial-files` to `rename_partial_files`

* refactor: change `rpc-version-minimum` to `rpc_version_minimum`

* refactor: change `rpc-version-semver` to `rpc_version_semver`

* refactor: change `rpc-version` to `rpc_version`

* refactor: change `script-torrent-added-enabled` to `script_torrent_added_enabled`

* refactor: change `script-torrent-added-filename` to `script_torrent_added_filename`

* refactor: change `script-torrent-done-enabled` to `script_torrent_done_enabled`

* refactor: change `script-torrent-done-filename` to `script_torrent_done_filename`

* refactor: change `script-torrent-done-seeding-enabled` to `script_torrent_done_seeding_enabled`

* refactor: change `script-torrent-done-seeding-filename` to `script_torrent_done_seeding_filename`

* refactor: change `seed-queue-enabled` to `seed_queue_enabled`

* refactor: change `seed-queue-size` to `seed_queue_size`

* refactor: change `seedRatioLimited` to `seed_ratio_limited`

* refactor: change `session-id` to `session_id`

* refactor: change `speed-limit-down-enabled` to `speed_limit_down_enabled`

* refactor: change `speed-limit-down` to `speed_limit_down`

* refactor: change `speed-limit-up-enabled` to `speed_limit_up_enabled`

* refactor: change `speed-limit-up` to `speed_limit_up`

* refactor: change `start-added-torrents` to `start_added_torrents`

* refactor: change `trash-original-torrent-files` to `trash_original_torrent_files`

* refactor: change `utp-enabled` to `utp_enabled`

* refactor: change `tcp-enabled` to `tcp_enabled`

* docs: add missing docs for RPC `tcp_enabled`

* refactor: change `speed-units` to `speed_units`

* refactor: change `speed-bytes` to `speed_bytes`

* refactor: change `size-units` to `size_units`

* refactor: change `size-bytes` to `size_bytes`

* refactor: change `memory-units` to `memory_units`

* refactor: change `memory-bytes` to `memory_bytes`

* refactor: change `session-set` to `session_set`

* refactor: change `session-get` to `session_get`

* refactor: change `session-stats` to `session_stats`

* refactor: change `activeTorrentCount` to `active_torrent_count`

* refactor: change `downloadSpeed` to `download_speed`

* refactor: change `pausedTorrentCount` to `paused_torrent_count`

* refactor: change `torrentCount` to `torrent_count`

* refactor: change `uploadSpeed` to `upload_speed`

* refactor: change `cumulative-stats` to `cumulative_stats`

* refactor: change `current-stats` to `current_stats`

* refactor: change `uploadedBytes` and `uploaded-bytes` to `uploaded_bytes`

* refactor: change `downloadedBytes` and `downloaded-bytes` to `downloaded_bytes`

* refactor: change `filesAdded` and `files-added` to `files_added`

* refactor: change `sessionCount` and `session-count` to `session_count`

* refactor: change `secondsActive` and `seconds-active` to `seconds_active`

* refactor: change `blocklist-update` to `blocklist_update`

* refactor: change `port-test` to `port_test`

* refactor: change `session-close` to `session_close`

* refactor: change `queue-move-top` to `queue_move_top`

* refactor: change `queue-move-up` to `queue_move_up`

* refactor: change `queue-move-down` to `queue_move_down`

* refactor: change `queue-move-bottom` to `queue_move_bottom`

* refactor: change `free-space` to `free_space`

* refactor: change `group-set` to `group_set`

* refactor: change `group-get` to `group_get`

* refactor: change `announce-ip` to `announce_ip`

* refactor: change `announce-ip-enabled` to `announce_ip_enabled`

* refactor: change `upload-slots-per-torrent` to `upload_slots_per_torrent`

* refactor: change `trash-can-enabled` to `trash_can_enabled`

* refactor: change `watch-dir-enabled` to `watch_dir_enabled`

* refactor: change `watch-dir-force-generic` to `watch_dir_force_generic`

* refactor: change `watch-dir` to `watch_dir`

* refactor: change `message-level` to `message_level`

* refactor: change `scrape-paused-torrents-enabled` to `scrape_paused_torrents_enabled`

* refactor: change `torrent-added-verify-mode` to `torrent_added_verify_mode`

* refactor: change `sleep-per-seconds-during-verify` to `sleep_per_seconds_during_verify`

* refactor: change `bind-address-ipv4` to `bind_address_ipv4`

* refactor: change `bind-address-ipv6` to `bind_address_ipv6`

* refactor: change `peer-congestion-algorithm` to `peer_congestion_algorithm`

* refactor: change `peer-socket-tos` to `peer_socket_tos`

* refactor: change `peer-port-random-high` to `peer_port_random_high`

* refactor: change `peer-port-random-low` to `peer_port_random_low`

* refactor: change `anti-brute-force-enabled` to `anti_brute_force_enabled`

* refactor: change `rpc-authentication-required` to `rpc_authentication_required`

* refactor: change `rpc-bind-address` to `rpc_bind_address`

* refactor: change `rpc-enabled` to `rpc_enabled`

* refactor: change `rpc-host-whitelist` to `rpc_host_whitelist`

* refactor: change `rpc-host-whitelist-enabled` to `rpc_host_whitelist_enabled`

* refactor: change `rpc-password` to `rpc_password`

* refactor: change `rpc-port` to `rpc_port`

* refactor: change `rpc-socket-mode` to `rpc_socket_mode`

* refactor: change `rpc-url` to `rpc_url`

* refactor: change `rpc-username` to `rpc_username`

* refactor: change `rpc-whitelist` to `rpc_whitelist`

* refactor: change `rpc-whitelist-enabled` to `rpc_whitelist_enabled`

* refactor: change `ratio-limit-enabled` to `ratio_limit_enabled`

* refactor: change `ratio-limit` to `ratio_limit`

* refactor: change `show-options-window` to `show_options_window`

* refactor: change `open-dialog-dir` to `open_dialog_dir`

* refactor: change `inhibit-desktop-hibernation` to `inhibit_desktop_hibernation`

* refactor: change `show-notification-area-icon` to `show_notification_area_icon`

* refactor: change `start-minimized` to `start_minimized`

* refactor: change `torrent-added-notification-enabled` to `torrent_added_notification_enabled`

* refactor: change `anti-brute-force-threshold` to `anti_brute_force_threshold`

* refactor: change `torrent-complete-notification-enabled` to `torrent_complete_notification_enabled`

* refactor: change `prompt-before-exit` to `prompt_before_exit`

* refactor: change `sort-mode` to `sort_mode`

* refactor: change `statusbar-stats` to `statusbar_stats`

* refactor: change `show-extra-peer-details` to `show_extra_peer_details`

* refactor: change `show-backup-trackers` to `show_backup_trackers`

* refactor: change `blocklist-date` to `blocklist_date`

* refactor: change `blocklist-updates-enabled` to `blocklist_updates_enabled`

* refactor: change `main-window-layout-order` to `main_window_layout_order`

* refactor: change `main-window-height` to `main_window_height`

* refactor: change `main-window-width` to `main_window_width`

* refactor: change `main-window-x` to `main_window_x`

* refactor: change `main-window-y` to `main_window_y`

* refactor: change `filter-mode` to `filter_mode`

* refactor: change `filter-trackers` to `filter_trackers`

* refactor: change `filter-text` to `filter_text`

* refactor: change `remote-session-enabled` to `remote_session_enabled`

* refactor: change `remote-session-host` to `remote_session_host`

* refactor: change `remote-session-https` to `remote_session_https`

* refactor: change `remote-session-password` to `remote_session_password`

* refactor: change `remote-session-port` to `remote_session_port`

* refactor: change `remote-session-requres-authentication` to `remote_session_requires_authentication`

* refactor: change `remote-session-username` to `remote_session_username`

* refactor: change `torrent-complete-sound-command` to `torrent_complete_sound_command`

* refactor: change `torrent-complete-sound-enabled` to `torrent_complete_sound_enabled`

* refactor: change `user-has-given-informed-consent` to `user_has_given_informed_consent`

* refactor: change `read-clipboard` to `read_clipboard`

* refactor: change `details-window-height` to `details_window_height`

* refactor: change `details-window-width` to `details_window_width`

* refactor: change `main-window-is-maximized` to `main_window_is_maximized`

* refactor: change `port-is-open` to `port_is_open`

* refactor: change `show-tracker-scrapes` to `show_tracker_scrapes`

* refactor: change `max-peers` to `max_peers`

* refactor: change `peers2-6` to `peers2_6`

* refactor: change `seeding-time-seconds` to `seeding_time_seconds`

* refactor: change `downloading-time-seconds` to `downloading_time_seconds`

* refactor: change `ratio-mode` to `ratio_mode`

* refactor: change `idle-limit` to `idle_limit`

* refactor: change `idle-mode` to `idle_mode`

* refactor: change `speed-Bps` to `speed_Bps`

* refactor: change `use-global-speed-limit` to `use_global_speed_limit`

* refactor: change `use-speed-limit` to `use_speed_limit`

* chore: remove TODO comment

* docs: add upgrade instructions to `5.0.0`

* chore: bump rpc semver major version

* chore: housekeeping
This commit is contained in:
Yat Ho
2025-12-02 06:08:18 +08:00
committed by GitHub
parent 030b22f91c
commit 05aef3e787
43 changed files with 3244 additions and 1815 deletions

View File

@@ -15,7 +15,7 @@ Transmission stores blocklists in a folder named `blocklists` in its [configurat
In that directory, files ending in ".bin" are blocklists that Transmission has parsed into a binary format suitable for quick lookups. When Transmission starts, it scans this directory for files not ending in ".bin" and tries to parse them. So to add another blocklist, all you have to do is put it in this directory and restart Transmission. Text and gzip formats are supported.
## Using blocklists in transmission-daemon ##
transmission-daemon does not have an "update blocklist" button, so its users have two options. They can either copy blocklists from transmission-gtk's directory to transmission-daemon's directory, or they can download a blocklist by hand, uncompress it, and place it in the daemon's `blocklists` folder. In both cases, the daemon's [settings.json file](Configuration-Files.md) will need to be edited to set "blocklist-enabled" to "true".
transmission-daemon does not have an "update blocklist" button, so its users have two options. They can either copy blocklists from transmission-gtk's directory to transmission-daemon's directory, or they can download a blocklist by hand, uncompress it, and place it in the daemon's `blocklists` folder. In both cases, the daemon's [settings.json file](Configuration-Files.md) will need to be edited to set "blocklist_enabled" to "true".
In both cases the daemon is unaware of blocklist updates. Only when it starts it creates new .bin files.
@@ -23,8 +23,8 @@ There is a third option: add the blocklist URL in settings.json (only one blockl
settings.json snippet:
```json
"blocklist-enabled": true,
"blocklist-url": "http://www.example.com/blocklist",
"blocklist_enabled": true,
"blocklist_url": "http://www.example.com/blocklist",
```
Manual update example:

View File

@@ -5,6 +5,18 @@ Note: The client _should_ be closed before making changes, otherwise settings wi
Some of Transmission's behavior can also be customized via environment variables.
# GTK / Daemon / CLI
> [!IMPORTANT]
> Transmisson 4.1.0 converted all configuration strings to snake_case.
>
> Your configuration file will be converted to snake_case automatically by running and stopping Transmission.
> Please keep a backup before upgrading if needed.
>
> The old kebab-case strings are still accepted in Transmission 4 but are deprecated and will be removed in the future.
>
> For documentation of the old configurations, please consult documentation from previous versions.
> https://github.com/transmission/transmission/blob/4.0.6/docs/Editing-Configuration-Files.md
### Overview
GTK, CLI and daemon (both on a Mac and Linux) use a [JSON](https://www.json.org/) formatted file, mainly because of its human readability.
(Consult the [JSON website](https://www.json.org/) for detailed information)
@@ -25,126 +37,126 @@ Here is a sample of the three basic types: respectively Boolean, Number and Stri
```json
{
"rpc-enabled": true,
"peer-port": 51413,
"rpc-whitelist": "127.0.0.1,192.168.*.*"
"rpc_enabled": true,
"peer_port": 51413,
"rpc_whitelist": "127.0.0.1,192.168.*.*"
}
```
### Options
#### IP Announce
* **announce-ip:** String (default = "") Alternative IP address to announce to the tracker.
* **announce-ip-enabled:** Boolean (default = false) When enabled **announce-ip** value is used instead of the client's address visible to the tracker for announcement requests.
* **announce_ip:** String (default = "") Alternative IP address to announce to the tracker.
* **announce_ip_enabled:** Boolean (default = false) When enabled `announce_ip` value is used instead of the client's address visible to the tracker for announcement requests.
#### Bandwidth
* **alt-speed-enabled:** Boolean (default = false, aka 'Turtle Mode')
* **alt_speed_enabled:** Boolean (default = false, aka 'Turtle Mode')
_Note: Clicking the "Turtle" in the GUI when the [scheduler](#Scheduling) is enabled, will only temporarily remove the scheduled limit until the next cycle._
* **alt-speed-up:** Number (kB/s, default = 50)
* **alt-speed-down:** Number (kB/s, default = 50)
* **speed-limit-down:** Number (kB/s, default = 100)
* **speed-limit-down-enabled:** Boolean (default = false)
* **speed-limit-up:** Number (kB/s, default = 100)
* **speed-limit-up-enabled:** Boolean (default = false)
* **upload-slots-per-torrent:** Number (default = 14)
* **alt_speed_up:** Number (kB/s, default = 50)
* **alt_speed_down:** Number (kB/s, default = 50)
* **speed_limit_down:** Number (kB/s, default = 100)
* **speed_limit_down_enabled:** Boolean (default = false)
* **speed_limit_up:** Number (kB/s, default = 100)
* **speed_limit_up_enabled:** Boolean (default = false)
* **upload_slots_per_torrent:** Number (default = 14)
#### [Blocklists](./Blocklists.md)
* **blocklist-url:** String (default = https://www.example.com/blocklist)
* **blocklist-enabled:** Boolean (default = false)
* **blocklist_url:** String (default = https://www.example.com/blocklist)
* **blocklist_enabled:** Boolean (default = false)
#### [Files and Locations](./Configuration-Files.md)
* **download-dir:** String (default = [default locations](Configuration-Files.md#Locations))
* **incomplete-dir:** String (default = [default locations](Configuration-Files.md#Locations)) Directory to keep files in until torrent is complete.
* **incomplete-dir-enabled:** Boolean (default = false) When enabled, new torrents will download the files to **incomplete-dir**. When complete, the files will be moved to **download-dir**.
* **download_dir:** String (default = [default locations](Configuration-Files.md#Locations))
* **incomplete_dir:** String (default = [default locations](Configuration-Files.md#Locations)) Directory to keep files in until torrent is complete.
* **incomplete_dir_enabled:** Boolean (default = false) When enabled, new torrents will download the files to `incomplete_dir`. When complete, the files will be moved to `download_dir`.
* **preallocation:** Number (0 = Off, 1 = Fast, 2 = Full (slower but reduces disk fragmentation), default = 1)
* **rename-partial-files:** Boolean (default = true) Postfix partially downloaded files with ".part".
* **start-added-torrents:** Boolean (default = true) Start torrents as soon as they are added.
* **trash-can-enabled:** Boolean (default = true) Whether to move the torrents to the system's trashcan or unlink them right away upon deletion from Transmission.
* **rename_partial_files:** Boolean (default = true) Postfix partially downloaded files with ".part".
* **start_added_torrents:** Boolean (default = true) Start torrents as soon as they are added.
* **trash_can_enabled:** Boolean (default = true) Whether to move the torrents to the system's trashcan or unlink them right away upon deletion from Transmission.
_Note: transmission-gtk only._
* **trash-original-torrent-files:** Boolean (default = false) Delete torrents added from the watch directory.
* **trash_original_torrent_files:** Boolean (default = false) Delete torrents added from the watch directory.
* **umask:** String (default = "022") Sets Transmission's file mode creation mask. See [the umask(2) manpage](https://man7.org/linux/man-pages/man2/umask.2.html) for more information.
* **watch-dir:** String
* **watch-dir-enabled:** Boolean (default = false) Watch a directory for torrent files and add them to Transmission.
_Note: When **watch-dir-enabled** is true, only the transmission-daemon, transmission-gtk, and transmission-qt applications will monitor **watch-dir** for new .torrent files and automatically load them._
* **watch-dir-force-generic**: Boolean (default = false) Force to use a watch directory implementation that does not rely on OS-specific mechanisms. Useful when your watch directory is on a network location, such as CIFS or NFS.
* **watch_dir:** String
* **watch_dir_enabled:** Boolean (default = false) Watch a directory for torrent files and add them to Transmission.
_Note: When `watch_dir_enabled` is true, only the transmission-daemon, transmission-gtk, and transmission-qt applications will monitor `watch_dir` for new .torrent files and automatically load them._
* **watch_dir_force_generic**: Boolean (default = false) Force to use a watch directory implementation that does not rely on OS-specific mechanisms. Useful when your watch directory is on a network location, such as CIFS or NFS.
_Note: transmission-daemon only._
#### Misc
* **cache-size-mb:** Number (default = 4), in MiB, to allocate for Transmission's memory cache. The cache is used to help batch disk IO together, so increasing the cache size can be used to reduce the number of disk reads and writes. The value is the total available to the Transmission instance. Set it to the smallest value tolerable by the random access performance of your storage medium to minimize data loss in case Transmission quit unexpectedly. Setting this to 0 bypasses the cache, which may be useful if your filesystem already has a cache layer that aggregates transactions. Pieces are guaranteed to be written to filesystem if sequential download is enabled. Otherwise, data might still be in cache only.
* **default-trackers:** String (default = "") A list of double-newline separated tracker announce URLs. These are used for all torrents in addition to the per torrent trackers specified in the torrent file. If a tracker is only meant to be a backup, it should be separated from its main tracker by a single newline character. If a tracker should be used additionally to another tracker it should be separated by two newlines. (e.g. "udp://tracker.example.invalid:1337/announce\n\nudp://tracker.another-example.invalid:6969/announce\nhttps://backup-tracker.another-example.invalid:443/announce\n\nudp://tracker.yet-another-example.invalid:1337/announce", in this case tracker.example.invalid, tracker.another-example.invalid and tracker.yet-another-example.invalid would be used as trackers and backup-tracker.another-example.invalid as backup in case tracker.another-example.invalid is unreachable.
* **dht-enabled:** Boolean (default = true) Enable [Distributed Hash Table (DHT)](https://wiki.theory.org/BitTorrentSpecification#Distributed_Hash_Table).
* **cache_size_mb:** Number (default = 4), in MiB, to allocate for Transmission's memory cache. The cache is used to help batch disk IO together, so increasing the cache size can be used to reduce the number of disk reads and writes. The value is the total available to the Transmission instance. Set it to the smallest value tolerable by the random access performance of your storage medium to minimize data loss in case Transmission quit unexpectedly. Setting this to 0 bypasses the cache, which may be useful if your filesystem already has a cache layer that aggregates transactions. Pieces are guaranteed to be written to filesystem if sequential download is enabled. Otherwise, data might still be in cache only.
* **default_trackers:** String (default = "") A list of double-newline separated tracker announce URLs. These are used for all torrents in addition to the per torrent trackers specified in the torrent file. If a tracker is only meant to be a backup, it should be separated from its main tracker by a single newline character. If a tracker should be used additionally to another tracker it should be separated by two newlines. (e.g. "udp://tracker.example.invalid:1337/announce\n\nudp://tracker.another-example.invalid:6969/announce\nhttps://backup-tracker.another-example.invalid:443/announce\n\nudp://tracker.yet-another-example.invalid:1337/announce", in this case tracker.example.invalid, tracker.another-example.invalid and tracker.yet-another-example.invalid would be used as trackers and backup-tracker.another-example.invalid as backup in case tracker.another-example.invalid is unreachable.
* **dht_enabled:** Boolean (default = true) Enable [Distributed Hash Table (DHT)](https://wiki.theory.org/BitTorrentSpecification#Distributed_Hash_Table).
* **encryption:** Number (0 = Prefer unencrypted connections, 1 = Prefer encrypted connections, 2 = Require encrypted connections; default = 1) [Encryption](https://wiki.vuze.com/w/Message_Stream_Encryption) preference. Encryption may help get around some ISP filtering, but at the cost of slightly higher CPU use.
* **lpd-enabled:** Boolean (default = false) Enable [Local Peer Discovery (LPD)](https://en.wikipedia.org/wiki/Local_Peer_Discovery).
* **message-level:** Number (0 = None, 1 = Critical, 2 = Error, 3 = Warn, 4 = Info, 5 = Debug, 6 = Trace; default = 4) Set verbosity of Transmission's log messages.
* **pex-enabled:** Boolean (default = true) Enable [Peer Exchange (PEX)](https://en.wikipedia.org/wiki/Peer_exchange).
* **lpd_enabled:** Boolean (default = false) Enable [Local Peer Discovery (LPD)](https://en.wikipedia.org/wiki/Local_Peer_Discovery).
* **message_level:** Number (0 = None, 1 = Critical, 2 = Error, 3 = Warn, 4 = Info, 5 = Debug, 6 = Trace; default = 4) Set verbosity of Transmission's log messages.
* **pex_enabled:** Boolean (default = true) Enable [Peer Exchange (PEX)](https://en.wikipedia.org/wiki/Peer_exchange).
* **pidfile:** String Path to file in which daemon PID will be stored (_transmission-daemon only_)
* **proxy_url:** String? (default = null) Proxy for HTTP(S) requests (for example, requests to tracker). Format `[scheme]://[host]:[port]`, where `scheme` is one of: `http`, `https`, `socks4`, `socks4h`, `socks5`, `socks5h`. If null, Transmission respects the CURL environment variables. If empty string, no proxy is used. For more information see [curl proxy documentation](https://curl.se/libcurl/c/CURLOPT_PROXY.html)
* **scrape-paused-torrents-enabled:** Boolean (default = true)
* **script-torrent-added-enabled:** Boolean (default = false) Run a script when a torrent is added to Transmission. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page.
* **script-torrent-added-filename:** String (default = "") Path to script.
* **script-torrent-done-enabled:** Boolean (default = false) Run a script when a torrent is done downloading. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page.
* **script-torrent-done-filename:** String (default = "") Path to script.
* **script-torrent-done-seeding-enabled:** Boolean (default = false) Run a script when a torrent is done seeding. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page.
* **script-torrent-done-seeding-filename:** String (default = "") Path to script.
* **scrape_paused_torrents_enabled:** Boolean (default = true)
* **script_torrent_added_enabled:** Boolean (default = false) Run a script when a torrent is added to Transmission. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page.
* **script_torrent_added_filename:** String (default = "") Path to script.
* **script_torrent_done_enabled:** Boolean (default = false) Run a script when a torrent is done downloading. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page.
* **script_torrent_done_filename:** String (default = "") Path to script.
* **script_torrent_done_seeding_enabled:** Boolean (default = false) Run a script when a torrent is done seeding. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page.
* **script_torrent_done_seeding_filename:** String (default = "") Path to script.
* **start_paused**: Boolean (default = false) Pause the torrents when daemon starts. _Note: transmission-daemon only._
* **tcp-enabled:** Boolean (default = true) **DEPRECATED**, use `preferred_transports` instead. Leave it at default and let Transmission manage this value to minimize accidents.
* **torrent-added-verify-mode:** String ("fast", "full", default: "fast") Whether newly-added torrents' local data should be fully verified when added, or wait and verify them on-demand later. See [#2626](https://github.com/transmission/transmission/pull/2626) for more discussion.
* **tcp_enabled:** Boolean (default = true) **DEPRECATED**, use `preferred_transports` instead. Leave it at default and let Transmission manage this value to minimize accidents.
* **torrent_added_verify_mode:** String ("fast", "full", default: "fast") Whether newly-added torrents' local data should be fully verified when added, or wait and verify them on-demand later. See [#2626](https://github.com/transmission/transmission/pull/2626) for more discussion.
* **torrent_complete_verify_enabled**: Boolean (default = false) Whether to verify the torrent once it finishes downloading.
* **utp-enabled:** Boolean (default = true) ***DEPRECATED***, use `preferred_transports` instead. Leave it at default and let Transmission manage this value to minimize accidents.
* **utp_enabled:** Boolean (default = true) ***DEPRECATED***, use `preferred_transports` instead. Leave it at default and let Transmission manage this value to minimize accidents.
* **preferred_transports:** String[] ("utp" = [Micro Transport Protocol (µTP)](https://en.wikipedia.org/wiki/Micro_Transport_Protocol), "tcp" = TCP; default = ["utp", "tcp"]) List your preference of transport protocols in the order of preferred-first. Omitting the transport protocol from the list will disable it.
_Note: Never disable TCP when you also disable µTP, because then your client would not be able to communicate. Disabling TCP might also break webseeds._
* **sleep-per-seconds-during-verify:** Number (default = 100) Controls the duration in milliseconds for which the verification process will pause to reduce disk I/O pressure.
* **sleep_per_seconds_during_verify:** Number (default = 100) Controls the duration in milliseconds for which the verification process will pause to reduce disk I/O pressure.
#### Peers
* **bind-address-ipv4:** String (default = "") Where to listen for peer connections. When no valid IPv4 address is provided, Transmission will bind to "0.0.0.0".
* **bind-address-ipv6:** String (default = "") Where to listen for peer connections. When no valid IPv6 address is provided, Transmission will try to bind to your default global IPv6 address. If that didn't work, then Transmission will bind to "::".
* **peer-congestion-algorithm:** String. This is documented on https://www.pps.jussieu.fr/~jch/software/bittorrent/tcp-congestion-control.html.
* **peer-limit-global:** Number (default = 200)
* **peer-limit-per-torrent:** Number (default = 50)
* **peer-socket-tos:** String (default = "le") Set the [DiffServ](https://en.wikipedia.org/wiki/Differentiated_services) parameter for outgoing packets. Allowed values are lowercase DSCP names. See the `tr_tos_t` class from `libtransmission/net.h` for the exact list of possible values.
* **bind_address_ipv4:** String (default = "") Where to listen for peer connections. When no valid IPv4 address is provided, Transmission will bind to "0.0.0.0".
* **bind_address_ipv6:** String (default = "") Where to listen for peer connections. When no valid IPv6 address is provided, Transmission will try to bind to your default global IPv6 address. If that didn't work, then Transmission will bind to "::".
* **peer_congestion_algorithm:** String. This is documented on https://www.pps.jussieu.fr/~jch/software/bittorrent/tcp-congestion-control.html.
* **peer_limit_global:** Number (default = 200)
* **peer_limit_per_torrent:** Number (default = 50)
* **peer_socket_tos:** String (default = "le") Set the [DiffServ](https://en.wikipedia.org/wiki/Differentiated_services) parameter for outgoing packets. Allowed values are lowercase DSCP names. See the `tr_tos_t` class from `libtransmission/net.h` for the exact list of possible values.
* **reqq:** Number (default = 2000) The number of outstanding block requests a peer is allowed to queue in the client. The higher this number, the higher the max possible upload speed towards each peer.
* **sequential_download** Boolean (default = false) Enable sequential download by default when adding torrents.
#### Peer Port
* **peer-port:** Number (default = 51413)
* **peer-port-random-high:** Number (default = 65535)
* **peer-port-random-low:** Number (default = 1024)
* **peer-port-random-on-start:** Boolean (default = false)
* **port-forwarding-enabled:** Boolean (default = true) Enable [UPnP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play) or [NAT-PMP](https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol).
* **peer_port:** Number (default = 51413)
* **peer_port_random_high:** Number (default = 65535)
* **peer_port_random_low:** Number (default = 1024)
* **peer_port_random_on_start:** Boolean (default = false)
* **port_forwarding_enabled:** Boolean (default = true) Enable [UPnP](https://en.wikipedia.org/wiki/Universal_Plug_and_Play) or [NAT-PMP](https://en.wikipedia.org/wiki/NAT_Port_Mapping_Protocol).
#### Queuing
* **download-queue-enabled:** Boolean (default = true) When true, Transmission will only download `download-queue-size` non-stalled torrents at once.
* **download-queue-size:** Number (default = 5) See download-queue-enabled.
* **queue-stalled-enabled:** Boolean (default = true) When true, torrents that have not shared data for `queue-stalled-minutes` are treated as 'stalled' and are not counted against the `download-queue-size` and `seed-queue-size` limits.
* **queue-stalled-minutes:** Number (default = 30) See queue-stalled-enabled.
* **seed-queue-enabled:** Boolean (default = false) When true. Transmission will only seed `seed-queue-size` non-stalled torrents at once.
* **seed-queue-size:** Number (default = 10) See seed-queue-enabled.
* **download_queue_enabled:** Boolean (default = true) When true, Transmission will only download `download_queue_size` non-stalled torrents at once.
* **download_queue_size:** Number (default = 5) See `download_queue_enabled`.
* **queue_stalled_enabled:** Boolean (default = true) When true, torrents that have not shared data for `queue_stalled_minutes` are treated as 'stalled' and are not counted against the `download_queue_size` and `seed_queue_size` limits.
* **queue_stalled_minutes:** Number (default = 30) See `queue_stalled_enabled`.
* **seed_queue_enabled:** Boolean (default = false) When true. Transmission will only seed `seed_queue_size` non-stalled torrents at once.
* **seed_queue_size:** Number (default = 10) See `seed_queue_enabled`.
#### [RPC](rpc-spec.md)
* **anti-brute-force-enabled:**: Boolean (default = false) Enable a very basic brute force protection for the RPC server. See "anti-brute-force-threshold" below.
* **anti-brute-force-threshold:**: Number (default = 100) After this amount of failed authentication attempts is surpassed, the RPC server will deny any further authentication attempts until it is restarted. This is not tracked per IP but in total.
* **rpc-authentication-required:** Boolean (default = false)
* **rpc-bind-address:** String (default = "0.0.0.0") Where to listen for RPC connections
* **rpc-enabled:** Boolean (default = true \[transmission-daemon\], false \[others\])
* **rpc-host-whitelist:** String (Comma-delimited list of domain names. Wildcards allowed using '\*'. Example: "*.foo.org,example.com", Default: "", Always allowed: "localhost", "localhost.", all the IP addresses. Added in v2.93)
* **rpc-host-whitelist-enabled:** Boolean (default = true. Added in v2.93)
* **rpc-password:** String. You can enter this in as plaintext when Transmission is not running, and then Transmission will salt the value on startup and re-save the salted version as a security measure. **Note:** Transmission treats passwords starting with the character `{` as salted, so when you first create your password, the plaintext password you enter must not begin with `{`.
* **rpc-port:** Number (default = 9091)
* **rpc-socket-mode:** String UNIX filesystem mode for the RPC UNIX socket (default: 0750; used when `rpc-bind-address` is a UNIX socket)
* **rpc-url:** String (default = /transmission/. Added in v2.2)
* **rpc-username:** String
* **rpc-whitelist:** String (Comma-delimited list of IP addresses. Wildcards allowed using '\*'. Example: "127.0.0.\*,192.168.\*.\*", Default: "127.0.0.1")
* **rpc-whitelist-enabled:** Boolean (default = true)
* **anti_brute_force_enabled:**: Boolean (default = false) Enable a very basic brute force protection for the RPC server. See `anti_brute_force_threshold` below.
* **anti_brute_force_threshold:**: Number (default = 100) After this amount of failed authentication attempts is surpassed, the RPC server will deny any further authentication attempts until it is restarted. This is not tracked per IP but in total.
* **rpc_authentication_required:** Boolean (default = false)
* **rpc_bind_address:** String (default = "0.0.0.0") Where to listen for RPC connections
* **rpc_enabled:** Boolean (default = true \[transmission-daemon\], false \[others\])
* **rpc_host_whitelist:** String (Comma-delimited list of domain names. Wildcards allowed using '\*'. Example: "*.foo.org,example.com", Default: "", Always allowed: "localhost", "localhost.", all the IP addresses. Added in v2.93)
* **rpc_host_whitelist_enabled:** Boolean (default = true. Added in v2.93)
* **rpc_password:** String. You can enter this in as plaintext when Transmission is not running, and then Transmission will salt the value on startup and re-save the salted version as a security measure. **Note:** Transmission treats passwords starting with the character `{` as salted, so when you first create your password, the plaintext password you enter must not begin with `{`.
* **rpc_port:** Number (default = 9091)
* **rpc_socket_mode:** String UNIX filesystem mode for the RPC UNIX socket (default: 0750; used when `rpc_bind_address` is a UNIX socket)
* **rpc_url:** String (default = /transmission/. Added in v2.2)
* **rpc_username:** String
* **rpc_whitelist:** String (Comma-delimited list of IP addresses. Wildcards allowed using '\*'. Example: "127.0.0.\*,192.168.\*.\*", Default: "127.0.0.1")
* **rpc_whitelist_enabled:** Boolean (default = true)
#### Scheduling
* **alt-speed-time-enabled:** Boolean (default = false)
_Note: When enabled, this will toggle the **alt-speed-enabled** setting._
* **alt-speed-time-begin:** Number (default = 540, in minutes from midnight, 9am)
* **alt-speed-time-end:** Number (default = 1020, in minutes from midnight, 5pm)
* **alt-speed-time-day:** Number/bitfield (default = 127, all days)
* **alt_speed_time_enabled:** Boolean (default = false)
_Note: When enabled, this will toggle the `alt_speed_enabled` setting._
* **alt_speed_time_begin:** Number (default = 540, in minutes from midnight, 9am)
* **alt_speed_time_end:** Number (default = 1020, in minutes from midnight, 5pm)
* **alt_speed_time_day:** Number/bitfield (default = 127, all days)
* Start with 0, then for each day you want the scheduler enabled, add:
* **Sunday**: 1 (binary: `0000001`)
* **Monday**: 2 (binary: `0000010`)
@@ -157,10 +169,10 @@ Here is a sample of the three basic types: respectively Boolean, Number and Stri
* **Weekdays**: 62 (binary: `0111110`)
* **Weekends**: 65 (binary: `1000001`)
* **All Days**: 127 (binary: `1111111`)
* **idle-seeding-limit:** Number (default = 30) Stop seeding after being idle for _N_ minutes.
* **idle-seeding-limit-enabled:** Boolean (default = false)
* **ratio-limit:** Number (default = 2.0)
* **ratio-limit-enabled:** Boolean (default = false)
* **idle_seeding_limit:** Number (default = 30) Stop seeding after being idle for _N_ minutes.
* **idle_seeding_limit_enabled:** Boolean (default = false)
* **ratio_limit:** Number (default = 2.0)
* **ratio_limit_enabled:** Boolean (default = false)
### Legacy Options
Only keys that differ from above are listed here. These options have been replaced in newer versions of Transmission.
@@ -196,7 +208,7 @@ Only keys that differ from above are listed here. These options have been replac
##### [RPC](rpc-spec.md)
* **rpc-access-control-list:** String (Comma-delimited list of IP addresses prefixed with "+" or "-". Wildcards allowed using '\*'. Example: "+127.0.0.\*,-192.168.\*.\*", Default: "+127.0.0.1")
## macOS
# macOS
### Overview
macOS has a standardized way of saving user preferences files using [XML](https://en.wikipedia.org/wiki/XML) format. These files are called [plist](https://en.wikipedia.org/wiki/Plist) (short for property list) files. Usually there is no need to modify these files directly, since Apple provided a [command-line tool](https://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man1/defaults.1.html) to reliably change settings. You do need to restart Transmission before these have effect.
@@ -206,5 +218,5 @@ In short:
### Options
* **PeerSocketTOS:** Number (Default = 0)
* **RPCHostWhitelist:** String, see "rpc-host-whitelist" above.
* **RPCUseHostWhitelist:** Boolean, see "rpc-host-whitelist-enabled" above.
* **RPCHostWhitelist:** String, see `rpc_host_whitelist` above.
* **RPCUseHostWhitelist:** Boolean, see `rpc_host_whitelist_enabled` above.

View File

@@ -48,22 +48,22 @@ Now, the config file can be edited. Some settings to draw your attention to:
{
...
# The default download directory.
"download-dir": "/home/youruser/Downloads",
"download_dir": "/home/youruser/Downloads",
...
# Reduce the global peer limit if your router is low on memory.
"peer-limit-global": 32,
"peer_limit_global": 32,
...
# For manual port forwarding. This controls the TCP and UDP bittorrent ports.
"peer-port": 32768,
"peer_port": 32768,
...
# Reject RPC commands from anybody except localhost. For untrusted LANs.
"rpc-bind-address": "127.0.0.1",
"rpc_bind_address": "127.0.0.1",
...
# If there are problems with other internet applications while bittorrent
# is running, you may need to reduce the max upload speed to under 80% of
# your ISP's max upload speed.
"speed-limit-up": 100, # in kB/s
"speed-limit-up-enabled": true,
"speed_limit_up": 100, # in kB/s
"speed_limit_up_enabled": true,
...
}
```

View File

@@ -1,45 +1,44 @@
Transmission keeps working information on each torrent in a "resume" file. This file is stored in the 'resume' directory.
Filename: `<torrent file name>.<hash?>.resume`
Filename: `<hash?>.resume`
The file contains the following **per-torrent** properties:
<table>
<tr><th>Property</th><th>Description</th></tr>
<tr><td><tt>activity-date</tt></td><td>Date we last uploaded/downloaded a piece of data</td></tr>
<tr><td><tt>added-date</tt></td><td>Date torrent was added</td></tr>
<tr><td><tt>corrupt</tt></td><td>total number of corrupt bytes downloaded</td></tr>
<tr><td><tt>done-date</tt></td><td>Date torrent finished downloading</td></tr>
<tr><td><tt>destination</tt></td><td>Download directory</td></tr>
<tr><td><tt>dnd</tt></td><td>Do not download file integer list (one item per file in torrent) 0=download, 1=dnd</td></tr>
<tr><td><tt>downloaded</tt></td><td>Total non-corrupt bytes downloaded</td></tr>
<tr><td><tt>incomplete-dir</tt></td><td>Location of incomplete torrent files</td></tr>
<tr><td><tt>max-peers</tt></td><td>Maximum number of connected peers</td></tr>
<tr><td><tt>paused</tt></td><td>true if torrent is paused</td></tr>
<tr><td><tt>peers2</tt></td><td>IPv4 peers</td></tr>
<tr><td><tt>peers2-6</tt></td><td>IPv6 peers</td></tr>
<tr><td><tt>priority</tt></td><td>list of file download priorities (one item per file in torrent),<br/>each value is -1 (low), 0 (std), +1 (high)</td></tr>
<tr><td><tt>bandwidth-priority</tt></td><td></td></tr>
<tr><td><tt>progress</tt></td><td></td></tr>
<tr><td><tt>speed-limit</tt></td><td></td></tr>
<tr><td><tt>speed-limit-up</tt></td><td>Torrent upload speed limit</td></tr>
<tr><td><tt>speed-limit-down</tt></td><td>Torrent download speed limit</td></tr>
<tr><td><tt>ratio-limit</tt></td><td>Torrent file limit</td></tr>
<tr><td><tt>uploaded</tt></td><td></td></tr>
<tr><td><tt>speed</tt></td><td></td></tr>
<tr><td><tt>use-global-speed-limit</tt></td><td></td></tr>
<tr><td><tt>use-speed-limit</tt></td><td></td></tr>
<tr><td><tt>down-speed</tt></td><td></td></tr>
<tr><td><tt>down-mode</tt></td><td></td></tr>
<tr><td><tt>up-speed</tt></td><td></td></tr>
<tr><td><tt>up-mode</tt></td><td></td></tr>
<tr><td><tt>ratio-mode</tt></td><td></td></tr>
<tr><td><tt>mtimes</tt></td><td></td></tr>
<tr><td><tt>bitfield</tt></td><td></td></tr>
</table>
| Property | Description |
| :-- | :-- |
| `activity_date` | Date we last uploaded/downloaded a piece of data |
| `added_date` | Date torrent was added |
| `corrupt` | total number of corrupt bytes downloaded |
| `done_date` | Date torrent finished downloading |
| `destination` | Download directory |
| `dnd` | Do not download file integer list (one item per file in torrent) 0=download, 1=dnd |
| `downloaded` | Total non-corrupt bytes downloaded |
| `incomplete_dir` | Location of incomplete torrent files |
| `max_peers` | Maximum number of connected peers |
| `paused` | true if torrent is paused |
| `peers2` | IPv4 peers |
| `peers2_6` | IPv6 peers |
| `priority` | list of file download priorities (one item per file in torrent),<br/>each value is -1 (low), 0 (std), +1 (high) |
| `bandwidth_priority` | |
| `progress` | |
| `speed-limit` | |
| `speed_limit_up` | Torrent upload speed limit |
| `speed_limit_down` | Torrent download speed limit |
| `ratio_limit` | Torrent file limit |
| `uploaded` | |
| `speed` | |
| `use_global_speed_limit` | |
| `use_speed_limit` | |
| `down-speed` | |
| `down-mode` | |
| `up-speed` | |
| `up-mode` | |
| `ratio_mode` | |
| `mtimes` | |
| `bitfield` | |
The file format is bencoding, as described in [bep_0003](https://www.bittorrent.org/beps/bep_0003.html).
## Constants
<table>
<tr><td>Maximum number of remembered peers</td><td><tt>MAX_REMEMBERED_PEERS</tt></td><td>200</td></tr>
</table>
| Maximum number of remembered peers | `MAX_REMEMBERED_PEERS` | 200 |

View File

@@ -1,9 +1,9 @@
> [!IMPORTANT]
> Transmisson 4.1.0 (`rpc-version` 18) added support for the JSON-RPC 2.0 protocol.
> Transmisson 4.1.0 (`rpc_version` 18) added support for the JSON-RPC 2.0 protocol and converted all RPC strings to snake_case.
>
> The old bespoke RPC protocol is still supported in Transmission 4 but is deprecated and will be removed in the future. People using the old protocol should update their code!
> The old bespoke RPC protocol, and the old mix of kebab-case and camelCase strings, are still supported in Transmission 4 but are deprecated and will be removed in the future. People using the old protocol should update their code!
>
> For documentation of the old RPC protocol, please consult documentation from previous versions.
> For documentation of the old RPC protocol and strings, please consult documentation from previous versions.
> https://github.com/transmission/transmission/blob/4.0.6/docs/rpc-spec.md
# Transmission's RPC specification
@@ -44,7 +44,7 @@ Response parameters are returned in the `result` Object.
"params": {
"fields": [ "version" ]
},
"method": "session-get",
"method": "session_get",
"id": 912313
}
```
@@ -121,7 +121,7 @@ content, `localhost` and `localhost.` domain names as well as all the IP
addresses are always implicitly allowed.
For more information on configuration, see settings.json documentation for
`rpc-host-whitelist-enabled` and `rpc-host-whitelist` keys.
`rpc_host_whitelist_enabled` and `rpc_host_whitelist` keys.
#### 2.2.3 Authentication
Enabling authentication is an optional security feature that can be enabled
@@ -138,11 +138,11 @@ username and password (respectively), separated by a colon.
### 3.1 Torrent action requests
| Method name | libtransmission function | Description
|:--|:--|:--
| `torrent-start` | tr_torrentStart | start torrent
| `torrent-start-now` | tr_torrentStartNow | start torrent disregarding queue position
| `torrent-stop` | tr_torrentStop | stop torrent
| `torrent-verify` | tr_torrentVerify | verify torrent
| `torrent-reannounce` | tr_torrentManualUpdate | re-announce to trackers now
| `torrent_start` | tr_torrentStart | start torrent
| `torrent_start_now` | tr_torrentStartNow | start torrent disregarding queue position
| `torrent_stop` | tr_torrentStop | stop torrent
| `torrent_verify` | tr_torrentVerify | verify torrent
| `torrent_reannounce` | tr_torrentManualUpdate | re-announce to trackers now
Request parameters: `ids`, which specifies which torrents to use.
All torrents are used if the `ids` parameter is omitted.
@@ -151,56 +151,56 @@ All torrents are used if the `ids` parameter is omitted.
1. an integer referring to a torrent id
2. a list of torrent id numbers, SHA1 hash strings, or both
3. a string, `recently-active`, for recently-active torrents
3. a string, `recently_active`, for recently-active torrents
Note that integer torrent ids are not stable across Transmission daemon
restarts. Use torrent hashes if you need stable ids.
Response parameters: none
### 3.2 Torrent mutator: `torrent-set`
Method name: `torrent-set`
### 3.2 Torrent mutator: `torrent_set`
Method name: `torrent_set`
Request parameters:
| Key | Value Type | Value Description
|:--|:--|:--
| `bandwidthPriority` | number | this torrent's bandwidth tr_priority_t
| `downloadLimit` | number | maximum download speed (kB/s)
| `downloadLimited` | boolean | true if `downloadLimit` is honored
| `files-unwanted` | array | indices of file(s) to not download
| `files-wanted` | array | indices of file(s) to download
| `bandwidth_priority` | number | this torrent's bandwidth tr_priority_t
| `download_limit` | number | maximum download speed (kB/s)
| `download_limited` | boolean | true if `download_limit` is honored
| `files_unwanted` | array | indices of file(s) to not download
| `files_wanted` | array | indices of file(s) to download
| `group` | string | The name of this torrent's bandwidth group
| `honorsSessionLimits` | boolean | true if session upload limits are honored
| `honors_session_limits` | boolean | true if session upload limits are honored
| `ids` | array | torrent list, as described in 3.1
| `labels` | array | array of string labels
| `location` | string | new location of the torrent's content
| `peer-limit` | number | maximum number of peers
| `priority-high` | array | indices of high-priority file(s)
| `priority-low` | array | indices of low-priority file(s)
| `priority-normal` | array | indices of normal-priority file(s)
| `queuePosition` | number | position of this torrent in its queue [0...n)
| `seedIdleLimit` | number | torrent-level number of minutes of seeding inactivity
| `seedIdleMode` | number | which seeding inactivity to use. See tr_idlelimit
| `seedRatioLimit` | double | torrent-level seeding ratio
| `seedRatioMode` | number | which ratio to use. See tr_ratiolimit
| `peer_limit` | number | maximum number of peers
| `priority_high` | array | indices of high-priority file(s)
| `priority_low` | array | indices of low-priority file(s)
| `priority_normal` | array | indices of normal-priority file(s)
| `queue_position` | number | position of this torrent in its queue [0...n)
| `seed_idle_limit` | number | torrent-level number of minutes of seeding inactivity
| `seed_idle_mode` | number | which seeding inactivity to use. See tr_idlelimit
| `seed_ratio_limit` | double | torrent-level seeding ratio
| `seed_ratio_mode` | number | which ratio to use. See tr_ratiolimit
| `sequential_download` | boolean | download torrent pieces sequentially
| `sequential_download_from_piece` | number | download from a specific piece when sequential download is enabled
| `trackerAdd` | array | **DEPRECATED** use `trackerList` instead
| `trackerList` | string | string of announce URLs, one per line, and a blank line between [tiers](https://www.bittorrent.org/beps/bep_0012.html).
| `trackerRemove` | array | **DEPRECATED** use `trackerList` instead
| `trackerReplace` | array | **DEPRECATED** use `trackerList` instead
| `uploadLimit` | number | maximum upload speed (kB/s)
| `uploadLimited` | boolean | true if `uploadLimit` is honored
| `tracker_add` | array | **DEPRECATED** use `tracker_list` instead
| `tracker_list` | string | string of announce URLs, one per line, and a blank line between [tiers](https://www.bittorrent.org/beps/bep_0012.html).
| `tracker_remove` | array | **DEPRECATED** use `tracker_list` instead
| `tracker_replace` | array | **DEPRECATED** use `tracker_list` instead
| `upload_limit` | number | maximum upload speed (kB/s)
| `upload_limited` | boolean | true if `upload_limit` is honored
Just as an empty `ids` value is shorthand for "all ids", using an empty array
for `files-wanted`, `files-unwanted`, `priority-high`, `priority-low`, or
`priority-normal` is shorthand for saying "all files".
for `files_wanted`, `files_unwanted`, `priority_high`, `priority_low`, or
`priority_normal` is shorthand for saying "all files".
Response parameters: none
### 3.3 Torrent accessor: `torrent-get`
Method name: `torrent-get`.
### 3.3 Torrent accessor: `torrent_get`
Method name: `torrent_get`.
Request parameters:
@@ -225,7 +225,7 @@ Response parameters:
a torrent's values for those keys. This format is more efficient
in terms of JSON generation and JSON parsing.
2. If the request's `ids` field was `recently-active`,
2. If the request's `ids` field was `recently_active`,
a `removed` array of torrent-id numbers of recently-removed
torrents.
@@ -235,95 +235,95 @@ The 'source' column here corresponds to the data structure there.
| Key | Value Type | transmission.h source
|:--|:--|:--
| `activityDate` | number | tr_stat
| `addedDate` | number | tr_stat
| `activity_date` | number | tr_stat
| `added_date` | number | tr_stat
| `availability` | array (see below)| tr_torrentAvailability()
| `bandwidthPriority` | number | tr_priority_t
| `bytesCompleted` | array (see below)| n/a
| `bandwidth_priority` | number | tr_priority_t
| `bytes_completed` | array (see below)| n/a
| `comment` | string | tr_torrent_view
| `corruptEver`| number | tr_stat
| `corrupt_ever`| number | tr_stat
| `creator`| string | tr_torrent_view
| `dateCreated`| number| tr_torrent_view
| `desiredAvailable`| number| tr_stat
| `doneDate`| number | tr_stat
| `downloadDir` | string | tr_torrent
| `downloadedEver` | number | tr_stat
| `downloadLimit` | number | tr_torrent
| `downloadLimited` | boolean | tr_torrent
| `editDate` | number | tr_stat
| `date_created`| number| tr_torrent_view
| `desired_available`| number| tr_stat
| `done_date`| number | tr_stat
| `download_dir` | string | tr_torrent
| `downloaded_ever` | number | tr_stat
| `download_limit` | number | tr_torrent
| `download_limited` | boolean | tr_torrent
| `edit_date` | number | tr_stat
| `error` | number | tr_stat
| `errorString` | string | tr_stat
| `error_string` | string | tr_stat
| `eta` | number | tr_stat
| `etaIdle` | number | tr_stat
| `file-count` | number | tr_info
| `eta_idle` | number | tr_stat
| `file_count` | number | tr_info
| `files`| array (see below)| n/a
| `fileStats`| array (see below)| n/a
| `file_stats`| array (see below)| n/a
| `group`| string| n/a
| `hashString`| string| tr_torrent_view
| `haveUnchecked`| number| tr_stat
| `haveValid`| number| tr_stat
| `honorsSessionLimits`| boolean| tr_torrent
| `hash_string`| string| tr_torrent_view
| `have_unchecked`| number| tr_stat
| `have_valid`| number| tr_stat
| `honors_session_limits`| boolean| tr_torrent
| `id` | number | tr_torrent
| `isFinished` | boolean| tr_stat
| `isPrivate` | boolean| tr_torrent
| `isStalled` | boolean| tr_stat
| `is_finished` | boolean| tr_stat
| `is_private` | boolean| tr_torrent
| `is_stalled` | boolean| tr_stat
| `labels` | array of strings | tr_torrent
| `leftUntilDone` | number| tr_stat
| `magnetLink` | string| n/a
| `manualAnnounceTime` | number| **DEPRECATED** don't use it, it never worked
| `maxConnectedPeers` | number| tr_torrent
| `metadataPercentComplete` | double| tr_stat
| `left_until_done` | number| tr_stat
| `magnet_link` | string| n/a
| `manual_announce_time` | number| **DEPRECATED** don't use it, it never worked
| `max_connected_peers` | number| tr_torrent
| `metadata_percent_complete` | double| tr_stat
| `name` | string| tr_torrent_view
| `peer-limit` | number| tr_torrent
| `peer_limit` | number| tr_torrent
| `peers` | array (see below)| n/a
| `peersConnected` | number| tr_stat
| `peersFrom` | object (see below)| n/a
| `peersGettingFromUs` | number| tr_stat
| `peersSendingToUs` | number| tr_stat
| `percentComplete` | double | tr_stat
| `percentDone` | double | tr_stat
| `peers_connected` | number| tr_stat
| `peers_from` | object (see below)| n/a
| `peers_getting_from_us` | number| tr_stat
| `peers_sending_to_us` | number| tr_stat
| `percent_complete` | double | tr_stat
| `percent_done` | double | tr_stat
| `pieces` | string (see below)| tr_torrent
| `pieceCount`| number| tr_torrent_view
| `pieceSize`| number| tr_torrent_view
| `piece_count`| number| tr_torrent_view
| `piece_size`| number| tr_torrent_view
| `priorities`| array (see below)| n/a
| `primary-mime-type`| string| tr_torrent
| `queuePosition`| number| tr_stat
| `rateDownload` (B/s)| number| tr_stat
| `rateUpload` (B/s)| number| tr_stat
| `recheckProgress`| double| tr_stat
| `secondsDownloading`| number| tr_stat
| `secondsSeeding`| number| tr_stat
| `seedIdleLimit`| number| tr_torrent
| `seedIdleMode`| number| tr_inactivelimit
| `seedRatioLimit`| double| tr_torrent
| `seedRatioMode`| number| tr_ratiolimit
| `primary_mime_type`| string| tr_torrent
| `queue_position`| number| tr_stat
| `rate_download` (B/s)| number| tr_stat
| `rate_upload` (B/s)| number| tr_stat
| `recheck_progress`| double| tr_stat
| `seconds_downloading`| number| tr_stat
| `seconds_seeding`| number| tr_stat
| `seed_idle_limit`| number| tr_torrent
| `seed_idle_mode`| number| tr_inactivelimit
| `seed_ratio_limit`| double| tr_torrent
| `seed_ratio_mode`| number| tr_ratiolimit
| `sequential_download`| boolean| tr_torrent
| `sequential_download_from_piece`| number| tr_torrent
| `sizeWhenDone`| number| tr_stat
| `startDate`| number| tr_stat
| `size_when_done`| number| tr_stat
| `start_date`| number| tr_stat
| `status`| number (see below)| tr_stat
| `torrent_file`| string| tr_info
| `total_size`| number| tr_torrent_view
| `trackers`| array (see below)| n/a
| `trackerList` | string | string of announce URLs, one per line, with a blank line between tiers
| `trackerStats`| array (see below)| n/a
| `totalSize`| number| tr_torrent_view
| `torrentFile`| string| tr_info
| `uploadedEver`| number| tr_stat
| `uploadLimit`| number| tr_torrent
| `uploadLimited`| boolean| tr_torrent
| `uploadRatio`| double| tr_stat
| `tracker_list` | string | string of announce URLs, one per line, with a blank line between tiers
| `tracker_stats`| array (see below)| n/a
| `uploaded_ever`| number| tr_stat
| `upload_limit`| number| tr_torrent
| `upload_limited`| boolean| tr_torrent
| `upload_ratio`| double| tr_stat
| `wanted`| array (see below)| n/a
| `webseeds`| array of strings | tr_tracker_view
| `webseedsSendingToUs`| number| tr_stat
| `webseeds_sending_to_us`| number| tr_stat
`availability`: An array of `pieceCount` numbers representing the number of connected peers that have each piece, or -1 if we already have the piece ourselves.
`availability`: An array of `piece_count` numbers representing the number of connected peers that have each piece, or -1 if we already have the piece ourselves.
`bytesCompleted`: An array of `tr_info.filecount` numbers. Each is the completed bytes for the corresponding file.
`bytes_completed`: An array of `tr_info.filecount` numbers. Each is the completed bytes for the corresponding file.
`files`: array of objects, each containing:
| Key | Value Type | transmission.h source
|:--|:--|:--
| `bytesCompleted` | number | tr_file_view
| `bytes_completed` | number | tr_file_view
| `length` | number | tr_file_view
| `name` | string | tr_file_view
| `begin_piece` | number | tr_file_view
@@ -331,52 +331,52 @@ The 'source' column here corresponds to the data structure there.
Files are returned in the order they are laid out in the torrent. References to "file indices" throughout this specification should be interpreted as the position of the file within this ordering, with the first file bearing index 0.
`fileStats`: a file's non-constant properties. An array of `tr_info.filecount` objects, in the same order as `files`, each containing:
`file_stats`: a file's non-constant properties. An array of `tr_info.filecount` objects, in the same order as `files`, each containing:
| Key | Value Type | transmission.h source
|:--|:--|:--
| `bytesCompleted` | number | tr_file_view
| `wanted` | boolean | tr_file_view (**Note:** Not to be confused with `torrent-get.wanted`, which is an array of 0/1 instead of boolean)
| `bytes_completed` | number | tr_file_view
| `wanted` | boolean | tr_file_view (**Note:** Not to be confused with `torrent_get.wanted`, which is an array of 0/1 instead of boolean)
| `priority` | number | tr_file_view
`peers`: an array of objects, each containing:
| Key | Value Type | transmission.h source
|:--|:--|:--
| `address` | string | tr_peer_stat
| `bytes_to_client` | number | tr_peer_stat
| `bytes_to_peer` | number | tr_peer_stat
| `clientName` | string | tr_peer_stat
| `clientIsChoked` | boolean | tr_peer_stat
| `clientIsInterested` | boolean | tr_peer_stat
| `flagStr` | string | tr_peer_stat
| `isDownloadingFrom` | boolean | tr_peer_stat
| `isEncrypted` | boolean | tr_peer_stat
| `isIncoming` | boolean | tr_peer_stat
| `isUploadingTo` | boolean | tr_peer_stat
| `isUTP` | boolean | tr_peer_stat
| `peerIsChoked` | boolean | tr_peer_stat
| `peerIsInterested` | boolean | tr_peer_stat
| `peer_id` | string | tr_peer_stat
| `port` | number | tr_peer_stat
| `progress` | double | tr_peer_stat
| `rateToClient` (B/s) | number | tr_peer_stat
| `rateToPeer` (B/s) | number | tr_peer_stat
| `address` | string | tr_peer_stat
| `bytes_to_client` | number | tr_peer_stat
| `bytes_to_peer` | number | tr_peer_stat
| `client_is_choked` | boolean | tr_peer_stat
| `client_is_interested` | boolean | tr_peer_stat
| `client_name` | string | tr_peer_stat
| `flag_str` | string | tr_peer_stat
| `is_downloading_from` | boolean | tr_peer_stat
| `is_encrypted` | boolean | tr_peer_stat
| `is_incoming` | boolean | tr_peer_stat
| `is_uploading_to` | boolean | tr_peer_stat
| `is_utp` | boolean | tr_peer_stat
| `peer_id` | string | tr_peer_stat
| `peer_is_choked` | boolean | tr_peer_stat
| `peer_is_interested` | boolean | tr_peer_stat
| `port` | number | tr_peer_stat
| `progress` | double | tr_peer_stat
| `rate_to_client` (B/s) | number | tr_peer_stat
| `rate_to_peer` (B/s) | number | tr_peer_stat
`peersFrom`: an object containing:
`peers_from`: an object containing:
| Key | Value Type | transmission.h source
|:--|:--|:--
| `fromCache` | number | tr_stat
| `fromDht` | number | tr_stat
| `fromIncoming` | number | tr_stat
| `fromLpd` | number | tr_stat
| `fromLtep` | number | tr_stat
| `fromPex` | number | tr_stat
| `fromTracker` | number | tr_stat
| `from_cache` | number | tr_stat
| `from_dht` | number | tr_stat
| `from_incoming` | number | tr_stat
| `from_lpd` | number | tr_stat
| `from_ltep` | number | tr_stat
| `from_pex` | number | tr_stat
| `from_tracker` | number | tr_stat
`pieces`: A bitfield holding pieceCount flags which are set to 'true' if we have the piece matching that position. JSON doesn't allow raw binary data, so this is a base64-encoded string. (Source: tr_torrent)
`pieces`: A bitfield holding `piece_count` flags which are set to 'true' if we have the piece matching that position. JSON doesn't allow raw binary data, so this is a base64-encoded string. (Source: tr_torrent)
`priorities`: An array of `tr_torrentFileCount()` numbers. Each is the `tr_priority_t` mode for the corresponding file.
@@ -403,38 +403,38 @@ Files are returned in the order they are laid out in the torrent. References to
| `sitename` | string | tr_tracker_view
| `tier` | number | tr_tracker_view
`trackerStats`: array of objects, each containing:
`tracker_stats`: array of objects, each containing:
| Key | Value Type | transmission.h source
|:--|:--|:--
| `announce` | string | tr_tracker_view
| `announceState` | number | tr_tracker_view
| `downloadCount` | number | tr_tracker_view
| `downloader_count` | number | tr_tracker_view
| `hasAnnounced` | boolean | tr_tracker_view
| `hasScraped` | boolean | tr_tracker_view
| `host` | string | tr_tracker_view
| `id` | number | tr_tracker_view
| `isBackup` | boolean | tr_tracker_view
| `lastAnnouncePeerCount` | number | tr_tracker_view
| `lastAnnounceResult` | string | tr_tracker_view
| `lastAnnounceStartTime` | number | tr_tracker_view
| `lastAnnounceSucceeded` | boolean | tr_tracker_view
| `lastAnnounceTime` | number | tr_tracker_view
| `lastAnnounceTimedOut` | boolean | tr_tracker_view
| `lastScrapeResult` | string | tr_tracker_view
| `lastScrapeStartTime` | number | tr_tracker_view
| `lastScrapeSucceeded` | boolean | tr_tracker_view
| `lastScrapeTime` | number | tr_tracker_view
| `lastScrapeTimedOut` | boolean | tr_tracker_view
| `leecherCount` | number | tr_tracker_view
| `nextAnnounceTime` | number | tr_tracker_view
| `nextScrapeTime` | number | tr_tracker_view
| `scrape` | string | tr_tracker_view
| `scrapeState` | number | tr_tracker_view
| `seederCount` | number | tr_tracker_view
| `sitename` | string | tr_tracker_view
| `tier` | number | tr_tracker_view
| `announce` | string | tr_tracker_view
| `announce_state` | number | tr_tracker_view
| `download_count` | number | tr_tracker_view
| `downloader_count` | number | tr_tracker_view
| `has_announced` | boolean | tr_tracker_view
| `has_scraped` | boolean | tr_tracker_view
| `host` | string | tr_tracker_view
| `id` | number | tr_tracker_view
| `is_backup` | boolean | tr_tracker_view
| `last_announce_peer_count` | number | tr_tracker_view
| `last_announce_result` | string | tr_tracker_view
| `last_announce_start_time` | number | tr_tracker_view
| `last_announce_succeeded` | boolean | tr_tracker_view
| `last_announce_time` | number | tr_tracker_view
| `last_announce_timed_out` | boolean | tr_tracker_view
| `last_scrape_result` | string | tr_tracker_view
| `last_scrape_start_time` | number | tr_tracker_view
| `last_scrape_succeeded` | boolean | tr_tracker_view
| `last_scrape_time` | number | tr_tracker_view
| `last_scrape_timed_out` | boolean | tr_tracker_view
| `leecher_count` | number | tr_tracker_view
| `next_announce_time` | number | tr_tracker_view
| `next_scrape_time` | number | tr_tracker_view
| `scrape` | string | tr_tracker_view
| `scrape_state` | number | tr_tracker_view
| `seeder_count` | number | tr_tracker_view
| `sitename` | string | tr_tracker_view
| `tier` | number | tr_tracker_view
`wanted`: An array of `tr_torrentFileCount()` 0/1, 1 (true) if the corresponding file is to be downloaded. (Source: `tr_file_view`)
@@ -452,10 +452,10 @@ Request:
{
"jsonrpc": "2.0",
"params": {
"fields": [ "id", "name", "totalSize" ],
"fields": [ "id", "name", "total_size" ],
"ids": [ 7, 10 ]
},
"method": "torrent-get",
"method": "torrent_get",
"id": 39693
}
```
@@ -470,12 +470,12 @@ Response:
{
"id": 10,
"name": "Fedora x86_64 DVD",
"totalSize": 34983493932
"total_size": 34983493932
},
{
"id": 7,
"name": "Ubuntu x86_64 DVD",
"totalSize": 9923890123
"total_size": 9923890123
}
]
},
@@ -484,25 +484,25 @@ Response:
```
### 3.4 Adding a torrent
Method name: `torrent-add`
Method name: `torrent_add`
Request parameters:
| Key | Value Type | Description
|:--|:--|:--
| `cookies` | string | pointer to a string of one or more cookies.
| `download-dir` | string | path to download the torrent to
| `download_dir` | string | path to download the torrent to
| `filename` | string | filename or URL of the .torrent file
| `labels` | array | array of string labels
| `metainfo` | string | base64-encoded .torrent content
| `paused` | boolean | if true, don't start the torrent
| `peer-limit` | number | maximum number of peers
| `bandwidthPriority` | number | torrent's bandwidth tr_priority_t
| `files-wanted` | array | indices of file(s) to download
| `files-unwanted` | array | indices of file(s) to not download
| `priority-high` | array | indices of high-priority file(s)
| `priority-low` | array | indices of low-priority file(s)
| `priority-normal` | array | indices of normal-priority file(s)
| `peer_limit` | number | maximum number of peers
| `bandwidth_priority` | number | torrent's bandwidth tr_priority_t
| `files_wanted` | array | indices of file(s) to download
| `files_unwanted` | array | indices of file(s) to not download
| `priority_high` | array | indices of high-priority file(s)
| `priority_low` | array | indices of low-priority file(s)
| `priority_normal` | array | indices of normal-priority file(s)
| `sequential_download` | boolean | download torrent pieces sequentially
| `sequential_download_from_piece` | number | download from a specific piece when sequential download is enabled
@@ -512,22 +512,22 @@ The format of the `cookies` should be `NAME=CONTENTS`, where `NAME` is the cooki
Response parameters:
* On success, a `torrent-added` object in the form of one of 3.3's torrent objects with the fields for `id`, `name`, and `hashString`.
* On success, a `torrent_added` object in the form of one of 3.3's torrent objects with the fields for `id`, `name`, and `hash_string`.
* When attempting to add a duplicate torrent, a `torrent-duplicate` object in the same form is returned, but the response's `result` value is still `success`.
* When attempting to add a duplicate torrent, a `torrent_duplicate` object in the same form is returned, but the response's `result` value is still `success`.
### 3.5 Removing a torrent
Method name: `torrent-remove`
Method name: `torrent_remove`
| Key | Value Type | Description
|:--|:--|:--
| `ids` | array | torrent list, as described in 3.1
| `delete-local-data` | boolean | delete local data. (default: false)
| `delete_local_data` | boolean | delete local data. (default: false)
Response parameters: none
### 3.6 Moving a torrent
Method name: `torrent-set-location`
Method name: `torrent_set_location`
Request parameters:
@@ -535,17 +535,17 @@ Request parameters:
|:--|:--|:--
| `ids` | array | torrent list, as described in 3.1
| `location` | string | the new torrent location
| `move` | boolean | if true, move from previous location. otherwise, search "location" for files (default: false)
| `move` | boolean | if true, move from previous location. otherwise, search `location` for files (default: false)
Response parameters: none
### 3.7 Renaming a torrent's path
Method name: `torrent-rename-path`
Method name: `torrent_rename_path`
For more information on the use of this function, see the transmission.h
documentation of `tr_torrentRenamePath()`. In particular, note that if this
call succeeds you'll want to update the torrent's `files` and `name` field
with `torrent-get`.
with `torrent_get`.
Request parameters:
@@ -561,64 +561,66 @@ Response parameters: `path`, `name`, and `id`, holding the torrent ID integer
### 4.1 Session parameters
| Key | Value Type | Description
|:--|:--|:--
| `alt-speed-down` | number | max global download speed (kB/s)
| `alt-speed-enabled` | boolean | true means use the alt speeds
| `alt-speed-time-begin` | number | when to turn on alt speeds (units: minutes after midnight)
| `alt-speed-time-day` | number | what day(s) to turn on alt speeds (look at tr_sched_day)
| `alt-speed-time-enabled` | boolean | true means the scheduled on/off times are used
| `alt-speed-time-end` | number | when to turn off alt speeds (units: same)
| `alt-speed-up` | number | max global upload speed (kB/s)
| `blocklist-enabled` | boolean | true means enabled
| `blocklist-size` | number | number of rules in the blocklist
| `blocklist-url` | string | location of the blocklist to use for `blocklist-update`
| `cache-size-mb` | number | maximum size of the disk cache (MiB). Pieces are guaranteed to be written to filesystem if sequential download is enabled. Otherwise, data might still be in cache only.
| `config-dir` | string | location of transmission's configuration directory
| `default-trackers` | string | announce URLs, one per line, and a blank line between [tiers](https://www.bittorrent.org/beps/bep_0012.html).
| `dht-enabled` | boolean | true means allow DHT in public torrents
| `download-dir` | string | default path to download torrents
| `download-dir-free-space` | number | **DEPRECATED** Use the `free-space` method instead.
| `download-queue-enabled` | boolean | if true, limit how many torrents can be downloaded at once
| `download-queue-size` | number | max number of torrents to download at once (see download-queue-enabled)
| `alt_speed_down` | number | max global download speed (kB/s)
| `alt_speed_enabled` | boolean | true means use the alt speeds
| `alt_speed_time_begin` | number | when to turn on alt speeds (units: minutes after midnight)
| `alt_speed_time_day` | number | what day(s) to turn on alt speeds (look at tr_sched_day)
| `alt_speed_time_enabled` | boolean | true means the scheduled on/off times are used
| `alt_speed_time_end` | number | when to turn off alt speeds (units: same)
| `alt_speed_up` | number | max global upload speed (kB/s)
| `anti_brute_force_enabled` | boolean | true means to enable a basic brute force protection for RPC server
| `blocklist_enabled` | boolean | true means enabled
| `blocklist_size` | number | number of rules in the blocklist
| `blocklist_url` | string | location of the blocklist to use for `blocklist_update`
| `cache_size_mb` | number | maximum size of the disk cache (MiB). Pieces are guaranteed to be written to filesystem if sequential download is enabled. Otherwise, data might still be in cache only.
| `config_dir` | string | location of transmission's configuration directory
| `default_trackers` | string | announce URLs, one per line, and a blank line between [tiers](https://www.bittorrent.org/beps/bep_0012.html).
| `dht_enabled` | boolean | true means allow DHT in public torrents
| `download_dir` | string | default path to download torrents
| `download_dir_free_space` | number | **DEPRECATED** Use the `free_space` method instead.
| `download_queue_enabled` | boolean | if true, limit how many torrents can be downloaded at once
| `download_queue_size` | number | max number of torrents to download at once (see `download_queue_enabled`)
| `encryption` | string | `required`, `preferred`, `tolerated`
| `idle-seeding-limit-enabled` | boolean | true if the seeding inactivity limit is honored by default
| `idle-seeding-limit` | number | torrents we're seeding will be stopped if they're idle for this long
| `incomplete-dir-enabled` | boolean | true means keep torrents in incomplete-dir until done
| `incomplete-dir` | string | path for incomplete torrents, when enabled
| `lpd-enabled` | boolean | true means allow Local Peer Discovery in public torrents
| `peer-limit-global` | number | maximum global number of peers
| `peer-limit-per-torrent` | number | maximum global number of peers
| `peer-port-random-on-start` | boolean | true means pick a random peer port on launch
| `peer-port` | number | port number
| `pex-enabled` | boolean | true means allow PEX in public torrents
| `port-forwarding-enabled` | boolean | true means ask upstream router to forward the configured peer port to transmission using UPnP or NAT-PMP
| `idle_seeding_limit` | number | torrents we're seeding will be stopped if they're idle for this long
| `idle_seeding_limit_enabled` | boolean | true if the seeding inactivity limit is honored by default
| `incomplete_dir` | string | path for incomplete torrents, when enabled
| `incomplete_dir_enabled` | boolean | true means keep torrents in `incomplete_dir` until done
| `lpd_enabled` | boolean | true means allow Local Peer Discovery in public torrents
| `peer_limit_global` | number | maximum global number of peers
| `peer_limit_per_torrent` | number | maximum global number of peers
| `peer_port_random_on_start` | boolean | true means pick a random peer port on launch
| `peer_port` | number | port number
| `pex_enabled` | boolean | true means allow PEX in public torrents
| `port_forwarding_enabled` | boolean | true means ask upstream router to forward the configured peer port to transmission using UPnP or NAT-PMP
| `preferred_transports` | string[] | preference of transport protocols, see `settings.json` for details
| `queue-stalled-enabled` | boolean | whether or not to consider idle torrents as stalled
| `queue-stalled-minutes` | number | torrents that are idle for N minuets aren't counted toward seed-queue-size or download-queue-size
| `rename-partial-files` | boolean | true means append `.part` to incomplete files
| `queue_stalled_enabled` | boolean | whether or not to consider idle torrents as stalled
| `queue_stalled_minutes` | number | torrents that are idle for N minuets aren't counted toward `seed_queue_size` or `download_queue_size`
| `rename_partial_files` | boolean | true means append `.part` to incomplete files
| `reqq` | number | the number of outstanding block requests a peer is allowed to queue in the client
| `rpc-version-minimum` | number | the minimum RPC API version supported
| `rpc-version-semver` | string | the current RPC API version in a [semver](https://semver.org)-compatible string
| `rpc-version` | number | the current RPC API version
| `script-torrent-added-enabled` | boolean | whether or not to call the `added` script
| `script-torrent-added-filename` | string | filename of the script to run
| `script-torrent-done-enabled` | boolean | whether or not to call the `done` script
| `script-torrent-done-filename` | string | filename of the script to run
| `script-torrent-done-seeding-enabled` | boolean | whether or not to call the `seeding-done` script
| `script-torrent-done-seeding-filename` | string | filename of the script to run
| `seed-queue-enabled` | boolean | if true, limit how many torrents can be uploaded at once
| `seed-queue-size` | number | max number of torrents to uploaded at once (see seed-queue-enabled)
| `seedRatioLimit` | double | the default seed ratio for torrents to use
| `seedRatioLimited` | boolean | true if seedRatioLimit is honored by default
| `rpc_version_minimum` | number | the minimum RPC API version supported
| `rpc_version_semver` | string | the current RPC API version in a [semver](https://semver.org)-compatible string
| `rpc_version` | number | the current RPC API version
| `script_torrent_added_enabled` | boolean | whether or not to call the `added` script
| `script_torrent_added_filename` | string | filename of the script to run
| `script_torrent_done_enabled` | boolean | whether or not to call the `done` script
| `script_torrent_done_filename` | string | filename of the script to run
| `script_torrent_done_seeding_enabled` | boolean | whether or not to call the `seeding_done` script
| `script_torrent_done_seeding_filename` | string | filename of the script to run
| `seed_queue_enabled` | boolean | if true, limit how many torrents can be uploaded at once
| `seed_queue_size` | number | max number of torrents to uploaded at once (see `seed_queue_enabled`)
| `seed_ratio_limit` | double | the default seed ratio for torrents to use
| `seed_ratio_limited` | boolean | true if `seed_ratio_limit` is honored by default
| `sequential_download` | boolean | true means sequential download is enabled by default for added torrents
| `session-id` | string | the current `X-Transmission-Session-Id` value
| `speed-limit-down-enabled` | boolean | true means enabled
| `speed-limit-down` | number | max global download speed (kB/s)
| `speed-limit-up-enabled` | boolean | true means enabled
| `speed-limit-up` | number | max global upload speed (kB/s)
| `start-added-torrents` | boolean | true means added torrents will be started right away
| `trash-original-torrent-files` | boolean | true means the .torrent file of added torrents will be deleted
| `session_id` | string | the current `X-Transmission-Session-Id` value
| `speed_limit_down` | number | max global download speed (kB/s)
| `speed_limit_down_enabled` | boolean | true means enabled
| `speed_limit_up` | number | max global upload speed (kB/s)
| `speed_limit_up_enabled` | boolean | true means enabled
| `start_added_torrents` | boolean | true means added torrents will be started right away
| `tcp_enabled` | boolean | true means allow TCP
| `trash_original_torrent_files` | boolean | true means the .torrent file of added torrents will be deleted
| `units` | object | see below
| `utp-enabled` | boolean | **DEPRECATED** Use `preferred_transports` instead
| `utp_enabled` | boolean | **DEPRECATED** Use `preferred_transports` instead
| `version` | string | long version string `$version ($revision)`
@@ -626,40 +628,41 @@ Response parameters: `path`, `name`, and `id`, holding the torrent ID integer
| Key | Value Type | transmission.h source
|:--|:--|:--
| `speed-units` | array | 4 strings: KB/s, MB/s, GB/s, TB/s
| `speed-bytes` | number | number of bytes in a KB (1000 for kB; 1024 for KiB)
| `size-units` | array | 4 strings: KB/s, MB/s, GB/s, TB/s
| `size-bytes` | number | number of bytes in a KB (1000 for kB; 1024 for KiB)
| `memory-units` | array | 4 strings: KB/s, MB/s, GB/s, TB/s
| `memory-bytes` | number | number of bytes in a KB (1000 for kB; 1024 for KiB)
| `speed_units` | array | 4 strings: KB/s, MB/s, GB/s, TB/s
| `speed_bytes` | number | number of bytes in a KB (1000 for kB; 1024 for KiB)
| `size_units` | array | 4 strings: KB/s, MB/s, GB/s, TB/s
| `size_bytes` | number | number of bytes in a KB (1000 for kB; 1024 for KiB)
| `memory_units` | array | 4 strings: KB/s, MB/s, GB/s, TB/s
| `memory_bytes` | number | number of bytes in a KB (1000 for kB; 1024 for KiB)
`rpc-version` indicates the RPC interface version supported by the RPC server.
`rpc_version` indicates the RPC interface version supported by the RPC server.
It is incremented when a new version of Transmission changes the RPC interface.
`rpc-version-minimum` indicates the oldest API supported by the RPC server.
`rpc_version_minimum` indicates the oldest API supported by the RPC server.
It is changes when a new version of Transmission changes the RPC interface
in a way that is not backwards compatible. There are no plans for this
to be common behavior.
#### 4.1.1 Mutators
Method name: `session-set`
Method name: `session_set`
Request parameters: the mutable properties from 4.1's parameters, i.e. all of them
except:
* `blocklist-size`
* `config-dir`
* `rpc-version-minimum`,
* `rpc-version-semver`
* `rpc-version`
* `session-id`
* `blocklist_size`
* `config_dir`
* `rpc_version_minimum`,
* `rpc_version_semver`
* `rpc_version`
* `session_id`
* `tcp_enabled`
* `units`
* `version`
Response parameters: none
#### 4.1.2 Accessors
Method name: `session-get`
Method name: `session_get`
Request parameters: an optional `fields` array of keys (see 4.1)
@@ -667,7 +670,7 @@ Response parameters: key/value pairs matching the request's `fields`
parameter if present, or all supported fields (see 4.1) otherwise.
### 4.2 Session statistics
Method name: `session-stats`
Method name: `session_stats`
Request parameters: none
@@ -675,36 +678,36 @@ Response parameters:
| Key | Value Type | Description
|:--|:--|:--
| `activeTorrentCount` | number
| `downloadSpeed` | number
| `pausedTorrentCount` | number
| `torrentCount` | number
| `uploadSpeed` | number
| `cumulative-stats` | stats object (see below)
| `current-stats` | stats object (see below)
| `active_torrent_count` | number
| `download_speed` | number
| `paused_torrent_count` | number
| `torrent_count` | number
| `upload_speed` | number
| `cumulative_stats` | stats object (see below)
| `current_stats` | stats object (see below)
A stats object contains:
| Key | Value Type | transmission.h source
|:--|:--|:--
| `uploadedBytes` | number | tr_session_stats
| `downloadedBytes` | number | tr_session_stats
| `filesAdded` | number | tr_session_stats
| `sessionCount` | number | tr_session_stats
| `secondsActive` | number | tr_session_stats
| `uploaded_bytes` | number | tr_session_stats
| `downloaded_bytes` | number | tr_session_stats
| `files_added` | number | tr_session_stats
| `seconds_active` | number | tr_session_stats
| `session_count` | number | tr_session_stats
### 4.3 Blocklist
Method name: `blocklist-update`
Method name: `blocklist_update`
Request parameters: none
Response parameters: a number `blocklist-size`
Response parameters: a number `blocklist_size`
### 4.4 Port checking
This method tests to see if your incoming peer port is accessible
from the outside world.
Method name: `port-test`
Method name: `port_test`
Request parameters: an optional parameter `ip_protocol`.
`ip_protocol` is a string specifying the IP protocol version to be used for the port test.
@@ -717,13 +720,13 @@ Response parameters:
| Key | Value Type | Description
| :-- | :-- | :--
| `port-is-open` | boolean | true if port is open, false if port is closed
| `port_is_open` | boolean | true if port is open, false if port is closed
| `ip_protocol` | string | `ipv4` if the test was carried out on IPv4, `ipv6` if the test was carried out on IPv6, unset if it cannot be determined
### 4.5 Session shutdown
This method tells the Transmission session to shut down.
Method name: `session-close`
Method name: `session_close`
Request parameters: none
@@ -732,10 +735,10 @@ Response parameters: none
### 4.6 Queue movement requests
| Method name | transmission.h source
|:--|:--
| `queue-move-top` | tr_torrentQueueMoveTop()
| `queue-move-up` | tr_torrentQueueMoveUp()
| `queue-move-down` | tr_torrentQueueMoveDown()
| `queue-move-bottom` | tr_torrentQueueMoveBottom()
| `queue_move_top` | tr_torrentQueueMoveTop()
| `queue_move_up` | tr_torrentQueueMoveUp()
| `queue_move_down` | tr_torrentQueueMoveDown()
| `queue_move_bottom` | tr_torrentQueueMoveBottom()
Request parameters:
@@ -749,7 +752,7 @@ Response parameters: none
This method tests how much free space is available in a
client-specified folder.
Method name: `free-space`
Method name: `free_space`
Request parameters:
@@ -762,28 +765,28 @@ Response parameters:
| Key | Value type | Description
|:--|:--|:--
| `path` | string | same as the Request parameter
| `size-bytes` | number | the size, in bytes, of the free space in that directory
| `size_bytes` | number | the size, in bytes, of the free space in that directory
| `total_size` | number | the total capacity, in bytes, of that directory
### 4.8 Bandwidth groups
#### 4.8.1 Bandwidth group mutator: `group-set`
Method name: `group-set`
#### 4.8.1 Bandwidth group mutator: `group_set`
Method name: `group_set`
Request parameters:
| Key | Value type | Description
|:--|:--|:--
| `honorsSessionLimits` | boolean | true if session upload limits are honored
| `honors_session_limits` | boolean | true if session upload limits are honored
| `name` | string | Bandwidth group name
| `speed-limit-down-enabled` | boolean | true means enabled
| `speed-limit-down` | number | max global download speed (kB/s)
| `speed-limit-up-enabled` | boolean | true means enabled
| `speed-limit-up` | number | max global upload speed (kB/s)
| `speed_limit_down` | number | max global download speed (kB/s)
| `speed_limit_down_enabled` | boolean | true means enabled
| `speed_limit_up` | number | max global upload speed (kB/s)
| `speed_limit_up_enabled` | boolean | true means enabled
Response parameters: none
#### 4.8.2 Bandwidth group accessor: `group-get`
Method name: `group-get`
#### 4.8.2 Bandwidth group accessor: `group_get`
Method name: `group_get`
Request parameters: An optional parameter `group`.
`group` is either a string naming the bandwidth group,
@@ -800,27 +803,27 @@ A bandwidth group description object has:
| Key | Value type | Description
|:--|:--|:--
| `honorsSessionLimits` | boolean | true if session upload limits are honored
| `honors_session_limits` | boolean | true if session upload limits are honored
| `name` | string | Bandwidth group name
| `speed-limit-down-enabled` | boolean | true means enabled
| `speed-limit-down` | number | max global download speed (kB/s)
| `speed-limit-up-enabled` | boolean | true means enabled
| `speed-limit-up` | number | max global upload speed (kB/s)
| `speed_limit_down` | number | max global download speed (kB/s)
| `speed_limit_down_enabled` | boolean | true means enabled
| `speed_limit_up` | number | max global upload speed (kB/s)
| `speed_limit_up_enabled` | boolean | true means enabled
## 5 Protocol versions
This section lists the changes that have been made to the RPC protocol.
There are two ways to check for API compatibility. Since most developers know
[semver](https://semver.org/), session-get's `rpc-version-semver` is the
[semver](https://semver.org/), `session_get`'s `rpc_version_semver` is the
recommended way. That value is a semver-compatible string of the RPC protocol
version number.
Since Transmission predates the semver 1.0 spec, the previous scheme was for
the RPC version to be a whole number and to increment it whenever a change was
made. That is session-get's `rpc-version`. `rpc-version-minimum` lists the
made. That is `session_get`'s `rpc_version`. `rpc_version_minimum` lists the
oldest version that is compatible with the current version; i.e. an app coded
to use `rpc-version-minimum` would still work on a Transmission release running
`rpc-version`.
to use `rpc_version_minimum` would still work on a Transmission release running
`rpc_version`.
Breaking changes are denoted with a :bomb: emoji.
@@ -902,7 +905,7 @@ Transmission 1.70 (`rpc-version-semver` 2.1.0, `rpc-version`: 6)
| Method | Description
|:---|:---
| `method torrent-set-location` | new method
| method `torrent-set-location` | new method
Transmission 1.80 (`rpc-version-semver` 3.0.0, `rpc-version`: 7)
@@ -1005,7 +1008,7 @@ Transmission 2.40 (`rpc-version-semver` 5.0.0, `rpc-version`: 14)
| `session-set` | new arg `queue-stalled-minutes`
| `session-set` | new arg `seed-queue-enabled`
| `session-set` | new arg `seed-queue-size`
| `torrent-get` | new arg `fromLpd` in peersFrom
| `torrent-get` | new arg `fromLpd` in `peersFrom`
| `torrent-get` | new arg `isStalled`
| `torrent-get` | new arg `queuePosition`
| `torrent-set` | new arg `queuePosition`
@@ -1062,26 +1065,27 @@ Transmission 4.0.0 (`rpc-version-semver` 5.3.0, `rpc-version`: 17)
| `group-get` | new method
| `torrent-get` | :warning: old arg `wanted` was implemented as an array of `0` or `1` in Transmission 3.00 and older, despite being documented as an array of booleans. Transmission 4.0.0 and 4.0.1 "fixed" this by returning an array of booleans; but in practical terms, this change caused an unannounced breaking change for any 3rd party code that expected `0` or `1`. For this reason, 4.0.2 restored the 3.00 behavior and updated this spec to match the code.
Transmission 4.1.0 (`rpc-version-semver` 6.0.0, `rpc-version`: 18)
Transmission 4.1.0 (`rpc_version_semver` 6.0.0, `rpc_version`: 18)
:bomb: switch to the JSON-RPC 2.0 protocol
:bomb: switch to snake_case for all strings
| Method | Description
|:---|:---
| `session-get` | new arg `sequential_download`
| `session-set` | new arg `sequential_download`
| `torrent-add` | new arg `sequential_download`
| `torrent-get` | new arg `sequential_download`
| `torrent-set` | new arg `sequential_download`
| `torrent-add` | new arg `sequential_download_from_piece`
| `torrent-get` | new arg `sequential_download_from_piece`
| `torrent-set` | new arg `sequential_download_from_piece`
| `torrent-get` | new arg `files.begin_piece`
| `torrent-get` | new arg `files.end_piece`
| `port-test` | new arg `ip_protocol`
| `torrent-get` | new arg `trackerStats.downloader_count`
| `torrent-get` | :warning: **DEPRECATED** `manualAnnounceTime`, it never worked
| `session-get` | new arg `preferred_transports`
| `session-set` | new arg `preferred_transports`
| `session-get` | :warning: **DEPRECATED** `utp-enabled`. Use `preferred_transports` instead.
| `session-set` | :warning: **DEPRECATED** `utp-enabled`. Use `preferred_transports` instead.
| `session_get` | new arg `sequential_download`
| `session_set` | new arg `sequential_download`
| `torrent_add` | new arg `sequential_download`
| `torrent_get` | new arg `sequential_download`
| `torrent_set` | new arg `sequential_download`
| `torrent_add` | new arg `sequential_download_from_piece`
| `torrent_get` | new arg `sequential_download_from_piece`
| `torrent_set` | new arg `sequential_download_from_piece`
| `torrent_get` | new arg `files.begin_piece`
| `torrent_get` | new arg `files.end_piece`
| `port_test` | new arg `ip_protocol`
| `torrent_get` | new arg `trackerStats.downloader_count`
| `torrent_get` | :warning: **DEPRECATED** `manual_announce_time`, it never worked
| `session_get` | new arg `preferred_transports`
| `session_set` | new arg `preferred_transports`
| `session_get` | :warning: **DEPRECATED** `utp_enabled`. Use `preferred_transports` instead.
| `session_set` | :warning: **DEPRECATED** `utp_enabled`. Use `preferred_transports` instead.