How can I sort by size? Always
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- 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.
How can I sort by size? Always
Every time I download a bunch I have to go and manually sort by size from smallest to largest. Is there a way to just have it always do it? IN the options I can see that I can sort by age but by size would really be nice. It makes little sense to have ten 1GB sized shows waiting behind a 20GB movie.
Re: How can I sort by size? Always
You can you that via the SAB API (See http://wiki.sabnzbd.org/api#toc24), using a script.
Example:
Get queue, and we're only interested in nzo name and size:
We want the smallest (so 622MB) to the top
... and that worked; the smallest download is at the top:
So you could write a script for that, and run it each 5 minutes.
Example:
Get queue, and we're only interested in nzo name and size:
Code: Select all
sander@flappie:~$ lynx --dump 'http://localhost:8080/api?mode=queue&output=xml' | grep -i -e nzo_id -e '<size>'
<nzo_id>SABnzbd_nzo_f34kP8</nzo_id>
<size>1.9 GB</size>
<nzo_id>SABnzbd_nzo_SqYCAW</nzo_id>
<size>622 MB</size>
<nzo_id>SABnzbd_nzo_XscFMc</nzo_id>
<size>13.2 GB</size>
<size>0 B</size>
sander@flappie:~$ Code: Select all
sander@flappie:~$ lynx --dump 'http://localhost:8080/api?mode=switch&value=SABnzbd_nzo_SqYCAW&value2=0'
0 0Code: Select all
sander@flappie:~$ lynx --dump 'http://localhost:8080/api?mode=queue&output=xml' | grep -i -e nzo_id -e '<size>'
<nzo_id>SABnzbd_nzo_SqYCAW</nzo_id>
<size>622 MB</size>
<nzo_id>SABnzbd_nzo_f34kP8</nzo_id>
<size>1.9 GB</size>
<nzo_id>SABnzbd_nzo_XscFMc</nzo_id>
<size>13.2 GB</size>
<size>0 B</size>
sander@flappie:~$