Skip to content

Transmission 4.1/4.2 API parity + JSON-RPC 2.0 support#600

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/check-transmission-changelog
Draft

Transmission 4.1/4.2 API parity + JSON-RPC 2.0 support#600
Copilot wants to merge 3 commits into
masterfrom
copilot/check-transmission-changelog

Conversation

Copilot AI commented Feb 21, 2026

Copy link
Copy Markdown

Transmission 4.1.0 deprecated the bespoke RPC protocol in favour of JSON-RPC 2.0 (all field names → snake_case, params/result instead of arguments, id instead of tag). Several new fields from 4.1.0 and 4.2.0 were also missing from the SDK.

Transparent JSON-RPC 2.0 protocol support

_FieldDict + _to_snake (types.py)

  • _to_snake() converts camelCase/kebab-case → snake_case (compiled regex, e.g. hashStringhash_string, file-countfile_count)
  • _FieldDict(dict) falls back to the snake_case equivalent key via __missing__ / __contains__ / get when a key isn't found directly
  • Container.fields is now a _FieldDictall existing property accessors work unchanged with both old camelCase/kebab responses and new JSON-RPC 2.0 snake_case responses

Auto-switching client (client.py)

  • _http_query now accepts method + arguments and builds the wire query per retry iteration; this lets a protocol switch detected from the CSRF 409 X-Transmission-Rpc-Version header take effect on the immediate retry — no extra round-trip
  • When rpc-version >= 18: emits {"jsonrpc":"2.0","method":"torrent_get","params":{…}} with all keys/field-list entries converted to snake_case
  • Response parsing handles both formats: JSON-RPC 2.0 (error / result) and legacy (result:"success" / arguments); res is wrapped in _FieldDict so torrent_added vs torrent-added differences resolve automatically
  • _update_server_version sets __use_jsonrpc2 = protocol_version >= 18
# SDK auto-detects; no API changes needed for callers
client = Client()  # connects to Transmission 4.1.0+
# Uses JSON-RPC 2.0 automatically; property accessors unchanged:
torrent.hash_string   # works whether server returned hashString or hash_string
session.rpc_version   # works whether server returned rpc-version or rpc_version

New fields (Transmission 4.1.0 / rpc-version 18)

Area New fields
Torrent sequential_download_from_piece
TrackerStats downloader_count
Tracker sitename
Session preferred_transports, sequential_download, cache_size_mib, anti_brute_force_enabled, reqq, session_id
set_session() preferred_transports, sequential_download, cache_size_mib; encryption now accepts "allowed"
add_torrent() / change_torrent() sequential_download_from_piece

New fields (Transmission 4.2.0 / rpc-version 19)

  • Torrent.webseeds_ex → list of new WebseedEx objects (url, is_downloading, download_bytes_per_second); exported from the top-level package
Original prompt

This section details on the original issue you should resolve

<issue_title>4.1.0 Readiness?</issue_title>
<issue_description>Heya! I'm a downstream user of this package and I was just curious if anyone's checked against what is currently missing from the updated API. Would be nice if there's a list/tool to programatically check what needs to be done to bring this package to parity.</issue_description>

<agent_instructions>check changelog of transmission to see if our sdk work with latest version of transmission </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@trim21 I guess no one. I haven't check changes of transmission yet

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: trim21 <13553903+trim21@users.noreply.github.com>
Copilot AI changed the title [WIP] Add missing API checks for 4.1.0 readiness Add Transmission 4.1.0 and 4.2.0 API parity Feb 21, 2026
Copilot AI requested a review from trim21 February 21, 2026 03:48
Copilot stopped work on behalf of trim21 due to an error February 21, 2026 03:49
Co-authored-by: trim21 <13553903+trim21@users.noreply.github.com>
Copilot AI changed the title Add Transmission 4.1.0 and 4.2.0 API parity Transmission 4.1/4.2 API parity + JSON-RPC 2.0 support Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.1.0 Readiness?

2 participants