Page 1 of 1

[API] "config" command "speedlimit" absolute value

Posted: March 4th, 2016, 10:42 pm
by Enesce
Hello

Currently calling `api?mode=config&name=speedlimit&value=50` will set the speedlimit to 50%, when previously it would be set to 50 Kb/s.
I had a look through api.py and couldn't find a suitable replacement added.

I propose simply adding "speedlimit_abs" with a value in bytes per second to the "config" command, in parity with the new "speedlimit_abs" result of "queue" & "qstatus".
E.g. `api?mode=config&name=speedlimit_abs&value=51200` to set speed limit to 50 Kb/s.
Hope this can be added before release.

Thanks.

Re: [API] "config" command "speedlimit" absolute value

Posted: March 5th, 2016, 2:36 am
by safihre
You can already to the current speedlimit api send bytes, or you can send 5M for 5mb/s or 1000K for 1000 kb/s. Already in there!

Re: [API] "config" command "speedlimit" absolute value

Posted: March 5th, 2016, 2:58 am
by Enesce
safihre wrote:You can already to the current speedlimit api send bytes, or you can send 5M for 5mb/s or 1000K for 1000 kb/s. Already in there!
Thanks, that is working. I hope the API documentation gets updated.

Also I've just noticed that the default skin seems to be calculating the KB/s part wrong in the speed limit text area.

For example, I set speedlimit to 150K, the skin is saying 102 KB/s
And when I set the speedlimit to 35% of 0.8M, the default skin is saying that is 307 KB/s... But it is actually 287 KB/s.

Re: [API] "config" command "speedlimit" absolute value

Posted: March 5th, 2016, 3:34 am
by safihre
Can you try the latest release (RC4)? This problem should be fixed there.

Re: [API] "config" command "speedlimit" absolute value

Posted: March 5th, 2016, 4:57 am
by safihre
Can confirm that indeed below 1MB/s the speedlimit was displayed wrongly! Will fix this!