From 5d159e0ee5f2813650efe3b8a14d4ae575373d3c Mon Sep 17 00:00:00 2001 From: Yat Ho Date: Sat, 9 Mar 2024 23:05:00 +0800 Subject: [PATCH] docs: fix `torrent-get` `fileStats` and `wanted` docs (#6677) * docs: fix `torrent-get.wanted` and `torrent-get.fileStats.wanted` docs * fixup! docs: fix `torrent-get.wanted` and `torrent-get.fileStats.wanted` docs * docs: add note to differentiate `torrent-get.wanted` and `torrent-get.fileStats.wanted` --- docs/rpc-spec.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/rpc-spec.md b/docs/rpc-spec.md index b224badca..964f3091e 100644 --- a/docs/rpc-spec.md +++ b/docs/rpc-spec.md @@ -303,7 +303,7 @@ The 'source' column here corresponds to the data structure there. | Key | Value Type | transmission.h source |:--|:--|:-- | `bytesCompleted` | number | tr_file_view -| `wanted` | number | tr_file_view (**Note:** For backwards compatibility, this is serialized as an array of `0` or `1` that should be treated as booleans) +| `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: @@ -400,8 +400,10 @@ The 'source' column here corresponds to the data structure there. | `tier` | number | tr_tracker_view -`wanted`: An array of `tr_torrentFileCount()` Booleans true if the corresponding file is to be downloaded. (Source: `tr_file_view`) +`wanted`: An array of `tr_torrentFileCount()` 0/1, 1 (true) if the corresponding file is to be downloaded. (Source: `tr_file_view`) +**Note:** For backwards compatibility, in `4.x.x`, `wanted` is serialized as an array of `0` or `1` that should be treated as booleans. +This will be fixed in `5.0.0` to return an array of booleans. Example: