@echo off
echo 1
echo.
echo.
echo.
echo.
if %3 == tv goto :tv
exit
:tv
if %6 LEQ 5368709120 echo 1
This is the script I'm using. Its purpose is to give anything in my "tv" category that's <= 5GiB top priority. It does its job pretty well so far, but whenever I click on a download that has its priority changed this way something strange happens. Upon the first click on the download, the GUI of SABnzbd switches its view from five downloads per page to viewing all downloads on the first page, when instead that download's details should appear. That however only happens on the 2nd click on that download.
Either I got the script wrong, or I found a bug in SABnzbd. Can anyone tell me which one it is?
PS: Fixed the script as suggested by sander.
Last edited by Ludwig on January 29th, 2013, 6:37 pm, edited 2 times in total.
Strange indeed, but that only occurred to me when I was about to go to bed no five minutes later. Serves me right for trying to do stuff when tired.
Yeah, well, it doesn't make sense because all it did before the fix was to change priorities of all downloads smaller than 5GiB and not just the "tv" ones. I can't explain it either. I can only report that today it works without messing up the GUI, even if I put that error back in. Must have been a hiccup that fixed itself, but that raises even more questions. I sometimes think these computers are living, breathing beings who's sole existence is to make out lives miserable.
I simply used the script from http://wiki.sabnzbd.org/user-pre-queue-script and changed it a bit. It also says on the site that a line "should only contain proper data (or be empty)."