mirror of
https://github.com/transmission/transmission
synced 2025-01-03 13:35:36 +00:00
fix: torrentGet.wanted RPC breaking change in [4.0.0..4.0.1] (#5170)
This commit is contained in:
parent
033d698306
commit
9c436d87dd
2 changed files with 3 additions and 3 deletions
|
@ -299,7 +299,7 @@ The 'source' column here corresponds to the data structure there.
|
|||
| Key | Value Type | transmission.h source
|
||||
|:--|:--|:--
|
||||
| `bytesCompleted` | number | tr_file_view
|
||||
| `wanted` | boolean | 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)
|
||||
| `priority` | number | tr_file_view
|
||||
|
||||
`peers`: an array of objects, each containing:
|
||||
|
@ -1000,4 +1000,4 @@ Transmission 4.0.0 (`rpc-version-semver` 5.3.0, `rpc-version`: 17)
|
|||
| `torrent-set` | :warning: **DEPRECATED** `trackerReplace`. Use `trackerList` instead.
|
||||
| `group-set` | new method
|
||||
| `group-get` | new method
|
||||
|
||||
| `wanted` | :warning: Transmission 3.00 and earlier sent this as an array of `0` or `1` 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 as a practical matter this caused an unannounced breaking change for 3rd party code that expects `0` or `1`. For this reason, 4.0.2 restores the 3.00 behavior and updates this spec to match the code.
|
||||
|
|
|
@ -853,7 +853,7 @@ void initField(tr_torrent const* const tor, tr_stat const* const st, tr_variant*
|
|||
tr_variantInitList(initme, n);
|
||||
for (tr_file_index_t i = 0; i < n; ++i)
|
||||
{
|
||||
tr_variantListAddBool(initme, tr_torrentFile(tor, i).wanted);
|
||||
tr_variantListAddInt(initme, tr_torrentFile(tor, i).wanted);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue