Hey Guys -
I use SABnzbd for a number of things and am a frequent user or categories and priorities per download made. The vast majority of my downloads are automated and come in via feeds, I want to be able to have specific items download as fast as possible while other low-priority items can come in slowly while I use my bandwidth for other things (in other apps / devices) such as FTP or whatever else.
Is there any way (I haven't found one yet) to set the download speed per category and/or priority via app settings, scripts, or other? If not, I would give it my vote as the #1 (and only) additional feature needed!
I've searched online where I've only found requests for similar features way back in 2011, but no solutions. Assuming it isn't a feature, anyone have suggestions for scripts or plug-ins to assist? I've already got download and upload QOS set up via my router which runs Gargoyle, but still it's based off ports and my true want is to have it based off priority inside of the app, itself.
Thanks Guys
Bandwidth Control At The Priority / Category Level
Re: Bandwidth Control At The Priority / Category Level
Not within SABnzbd itself. However, I think you can do it yourself via the SABnzbd API (http://wiki.sabnzbd.org/api), as the API offers info about the queue, and you can set the SABnzbd max speed. So something like:bzowk wrote: Is there any way (I haven't found one yet) to set the download speed per category and/or priority via app settings, scripts, or other?
Code: Select all
repeat:
get info about current item being dowloaded
determine speed based on Priority / Category
set speed via API
wait 1 minute
Of course!bzowk wrote: If not, I would give it my vote as the #1 (and only) additional feature needed!
Re: Bandwidth Control At The Priority / Category Level
Not quite sure how to apply the code, but will look though the documentation. Thanks for the suggestion!
Re: Bandwidth Control At The Priority / Category Level
OK, been trying a few things via Wiki. Still don't see how to integrate code you suggested, though. It's multi-line so wouldn't be via address line. How would I start playing with it? Thanks!
Re: Bandwidth Control At The Priority / Category Level
It's not code; it's pseudo code to give an idea of what you could do in a real language like Python.
Do you know any programming language?
EDIT:
Below is real, working python code that sets the SAB download speed based on category of the current active download.
Do you know any programming language?
EDIT:
Below is real, working python code that sets the SAB download speed based on category of the current active download.
Code: Select all
# made by the JSON King
#
import json
import urllib
apikey = 'b463b755ad289e4fd2e2e7319ab6eacf'
baseurl = 'http://localhost:8080/'
importcategory = 'superman2'
def setSpeed(speedkBps):
# Example: Set download speed to 400 kB/s:
# 'http://localhost:8080/api?mode=config&name=speedlimit&value=400'
url = '%sapi?mode=config&name=speedlimit&value=%s&apikey=%s' % (baseurl, speedkBps, apikey)
urlresult = urllib.urlopen(url)
return urlresult.read()
def getCatActiveDownload():
# Return Category of item currently being downloaded (if any)
url = '%sapi?mode=queue&start=START&limit=LIMIT&output=json&apikey=%s' % (baseurl, apikey)
urlresult = urllib.urlopen(url)
parsed = json.loads(urlresult.read())
for thisslot in parsed['queue']['slots'] :
if thisslot['status'] == 'Downloading':
# Active download
return thisslot['cat']
return None
if getCatActiveDownload() == importcategory :
print setSpeed(2000000)
else :
print setSpeed(100)