Open lighterowl opened 1 year ago
Sadly, this cannot be done without extra work in Transmission itself as there is no information about piece-to-file mapping exposed via the RPC. The daemon must know this because it must be able to map incoming pieces into corresponding files, so this is "just" a matter of exposing this mapping.
PR submitted in Transmission : https://github.com/transmission/transmission/pull/5578
Sadly, this cannot be done without extra work in Transmission itself as there is no information about piece-to-file mapping exposed via the RPC.
As discussed in transmission/transmission#5578, the piece-to-file mapping can be deduced directly from the ordered list of files, their lengths and the piece size, all of which are already available via RPC. There is no need to extend the Transmission RPC interface. In fact it would probably make more sense for your software to manually compute the mapping despite the new fields, because that way it would work even with older Transmission versions.
Agreed - beginPiece
and endPiece
should be treated as a failed experiment at this point. The linked ticket contains a procedure that can be used for calculating the piece numbers that a given file spans.
https://github.com/transmission-remote-gui/transgui/issues/1454
I like the idea, sounds cool and will be interesting to see how the code drawing the main piece bar does it and whether it's reusable in the VarGrid used for files.