Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to Transmission RPC specification as of Transmission 4.1.0 #26

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Jdbye
Copy link

@Jdbye Jdbye commented Jun 9, 2024

Added all the missing fields, 2 new methods (group-set and group-get) and the missing torrent-reannounce method, and added the optional fields argument for session-get.

Jdbye added 5 commits June 9, 2024 18:00
* All new methods implemented
* All new fields readable
* "format" optional parameter of torrent-get remains unimplemented, for now. This is not needed but provides some efficiency benefits if the "table" format type is implemented.
…clarity, added TorrentGetRecentlyActive

Also added missing summaries to get rid of those pesky warnings from Visual Studio
* Significantly more performant (around 20% when fetching a large amount of torrents with torrent-get)
* torrent-get now supports the table format. This by itself only provides a small speed improvement.
* RPC requests no longer need to deserialize->serialize->deserialize the JSON to arrive at the final result. Once is enough.
It didn't read all the fields correctly and there was very minimal improvement in performance anyway.
@Jdbye
Copy link
Author

Jdbye commented Jun 10, 2024

Made some significant performance improvements (about 20%) by removing the repeated Deserialize and Serialize calls in order to read the arguments.
Instead, TransmissionResponse now simply contains a JObject pointing to the arguments, which can be converted with ToObject.

Attempted table format support for torrent-get was a failure and does not seem worth the trouble fixing for the minor performance gains (a few % at most)
There just isn't an easy way to read the table data and convert it into TorrentInfo[] and there is too much potential for introducing subtle bugs with certain data not being read correctly. Maybe a different library other than Newtonsoft.Json would be better suited for this job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant