New JSON-RPC 2.0 RPC API in Transmission 4.1.0
Transmission 4.1 has a new JSON-RPC 2.0-compliant RPC API: https://github.com/transmission/transmission/pull/7269 https://github.com/transmission/transmission/pull/7108
Transmission 4.1 will remain backwards compatible and continue supporting the current, legacy RPC API but the legacy RPC API will be removed in 5.0.
We should decide whether to (a) keep both API:s in stig and choose based on the version or (b) when transmission 5.0 is released stop supporting transmission < 4.1
I have not yet looked into how much work it will be to migrate to the new API.
This might be as easy as changing TransmissionRPC._send_request and TransmissionRPC.__getattr__ to choose the appropriate API version. We might also have to change TransmissionRPC.connect so that it detects which API the server supports.
Thanks for the heads up.
Simply renaming JSON object keys would be a nice and easy fix, but we should probably expect some behavioural changes as well.
For example, it looks like we might finally get error messages on failed RPC calls, wich is great news, but it also means we must (or should) touch/remove the workaround code that deals with the lack of error messages. I don't know how much work this would be.
For what it's worth, I've put some work into a wrapper API for Transmission, Qbittorrent, Deluge and rtorrent: https://codeberg.org/plotski/aiobtclientapi
It's extremely incomplete (almost useless except for adding torrents), and I'm not super confident about it, but I think it's a good basis. I'd be interested in your thoughts if you have any.