Modify throttle status bar mod to be able to display multiple values
chros73 opened this issue · 0 comments
chros73 commented
Modify status bar mod (#4, #37) to be able to display multiple throttle.up and throttle.down as well, also change name of config directive.
Currently the beginning of status bar looks like this:
[Throttle 500/1500 KB] [Rate: 441.6/981.3 KB]
Include the max limit of the throttles, the main upload rate and the upload rate of the throttles (in this order); and main download rate and the download rate of the selected throttles.
Possible cases look like these:
[Throttle 200 / 500 KB] [Rate 107.4 / 298.6 KB]
[Throttle 200(114) / 500 KB] [Rate 107.0(1.0|105.9) / 307.6 KB]
[Throttle 200 / 500(250) KB] [Rate 124.7 / 298.2(298.2|0.0) KB]
[Throttle 200(114) / 500(250) KB] [Rate 115.9(1.7|114.2) / 333.9(333.9|0.0) KB]
[Throttle 3500(75|25) / 8000 KB] [Rate 1745.5(1635.1|85.0|25.4) / 7.3 KB]
- make the displayable throttle names configurable via config file:
ui.status.throttle.up.set
andui.status.throttle.down.set
- original code is refactored
- throttle.up and throttle.down values can be specified simultanously (as in the last example)
- name of throttles must be specified without surrounding quotes (the setting no longer a
string
but alist
)ui.status.throttle.up.set = slowup , tardyup
ui.status.throttle.down.set = slowup
- limitation is that every group (there are 4 possible groups) can contain the following number of characters (it leaves space for at least 5 throttles to be displayed):
- limit: 40 chars
- rate: 50 chars
- don't display this extra info of a given throttle in the following cases:
- there isn't any throttle name as the config variables suggest or the given name is "NULL"
- the throttle is not throttled (=0)
- the global upload/download is not throttled (=0) (the throttle won't be taken into account in this case)