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

Questions and bug reports for Beta releases should be posted here.
Forum rules
Help us help you:
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
Enesce
Newbie
Newbie
Posts: 9
Joined: October 10th, 2014, 5:06 am

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

Post 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.
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post 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!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
Enesce
Newbie
Newbie
Posts: 9
Joined: October 10th, 2014, 5:06 am

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

Post 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.
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post by safihre »

Can you try the latest release (RC4)? This problem should be fixed there.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5362
Joined: April 30th, 2015, 7:35 am
Contact:

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

Post by safihre »

Can confirm that indeed below 1MB/s the speedlimit was displayed wrongly! Will fix this!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply