Closed rsekman closed 2 years ago
Thank you.
Annoyingly, the global properties do not follow the pattern of the other session properties (Sec 4.1 of the RPC spec), and they are
seedRatio*
in the RPC butratio-limit*
in the config file.
stig implements an abstraction layer above Transmission's RPC and therefore uses its own naming schemes. Can you give examples for the inconsistencies you see?
I'll review this properly later this week.
I've created a "ratio-limit" branch and made this feature somewhat usable.
There's still lots of work to do.
stig ratiolimit
should display the current global limit. That shouldn't be
too hard.
It would be nice if stig ratiolimit
would also print all torrents with a
custom ratio limit. To implement that properly, you'd have to add a
"limit-ratio-mode" torrent filter.
In the TUI, ratiolimit 123 global
should set the default limit while
ratiolimit 123
should set the limit for the marked or focused
torrent(s). This is how ratelimit
does it.
In CLI mode, the default limit is displayed as "disconnected" because the relevant request is never made. I'm not sure if there is a good fix.
A few TODOs:
GLOBAL
,SINGLE
, andUNLIMITED
. For ease of use the same command should be able to set the mode to both finite values andUNLIMITED
(like how-1
sometimes means unlimited or disabled).ls
should be formatted like it is indetails
view; e.g. if the mode isGLOBAL
andratio-limit-enabled = false
it should displaydisabled
. The logic is the same as indetails
view but importingobjects.remotecfg
causes a circular import. I'm not familiar enough with the code to resolve or work around this.seedRatio*
in the RPC butratio-limit*
in the config file. Names in the code are possibly inconsistent and should be adjusted.