Page 1 of 1

Categories not automatically setting priority on add

Posted: February 26th, 2010, 1:47 am
by rudyb
This issue doesn't appear to have been fixed in 0.5.0 final.

http://forums.sabnzbd.org/http://forums ... 302#p26302

When downloads are added by (for example) Episode Butler, and via fetching bookmarks from Newzbin, their priorities aren't set as specified in the categories screen.

To the best of my knowledge, Episode Butler doesn't set a priority when adding downloads (though, I don't know for sure. I'm just assuming because there isn't an option for it).

Re: Categories not automatically setting priority on add

Posted: February 26th, 2010, 6:13 pm
by Camelot
yea, I am experiencing the same issue:
http://forums.sabnzbd.org/index.php?topic=3752.0
Though mistakingly blamed episodebutler for not adding the correct priority...

Re: Categories not automatically setting priority on add

Posted: February 26th, 2010, 9:58 pm
by rudyb
Well, for all I know, it IS episode butler setting the wrong priority, bit the fact that it doesn't work via newzbin bookmarks makes me think it's a bug. *shrug*

Re: Categories not automatically setting priority on add

Posted: February 27th, 2010, 4:52 am
by shypike
Under investigation.

Re: Categories not automatically setting priority on add

Posted: February 27th, 2010, 10:06 am
by shypike
The problem is caused by the utility, not by SABnzbd.

When category "music" is set to High priority, this is the result of API calls:

http://localhost:8080/sabnzbd/api?mode= ... =blablabla
priority = High (as set in the category)

http://localhost:8080/sabnzbd/api?mode= ... =blablabla
priority = Low (override in the call -1 = "Low")

http://localhost:8080/sabnzbd/api?mode= ... =blablabla
priority = Normal (overide in the calll, empty means default, which I set to(in my case) Normal)

All correct and as documented.
Substitute an NZB link and api-key of your own and you can test this in the web browser.


The only "fix" we could do is to ignore an empty priority string instead of treating it like "Default".
But that may break other utilities.

Re: Categories not automatically setting priority on add

Posted: February 27th, 2010, 11:08 am
by rudyb
Okay, thanks for the extra details.

What about newzbin bookmark adding?

Re: Categories not automatically setting priority on add

Posted: February 27th, 2010, 11:21 am
by shypike
rudyb wrote: What about newzbin bookmark adding?
Yep, bookmarks will always get "Normal" priority.
Will be fixed in 0.5.1

Re: Categories not automatically setting priority on add

Posted: February 27th, 2010, 12:09 pm
by rudyb
Roger that. I'll go harrass Episode Butler people.


(btw, is there a way in SABnzbd to see what URL/API data is being passed to it by an external app?)

Re: Categories not automatically setting priority on add

Posted: February 27th, 2010, 6:14 pm
by shypike
rudyb wrote: (btw, is there a way in SABnzbd to see what URL/API data is being passed to it by an external app?)
It should show in the cherrypy.log file, but it doesn't.
There is one way to do it.
Stop SABnzbd.exe and instead run SABnzbd-console from a command prompt
and add the -w1 parameter.
That will show all logging in the command window.
Make sure that you are not downloading at the same time.
Try a small NZB or else you won't find the api call event.

Re: Categories not automatically setting priority on add

Posted: March 9th, 2010, 4:51 am
by Camelot
shypike wrote: ...

The only "fix" we could do is to ignore an empty priority string instead of treating it like "Default".
But that may break other utilities.
Yea, you shouldn't have to make that change. I am sure the episodebutler developer will issue an update fixing this!
Thanks for looking into the matter!

Re: Categories not automatically setting priority on add

Posted: March 9th, 2010, 12:07 pm
by rudyb
shypike wrote:
rudyb wrote: (btw, is there a way in SABnzbd to see what URL/API data is being passed to it by an external app?)
It should show in the cherrypy.log file, but it doesn't.
There is one way to do it.
Stop SABnzbd.exe and instead run SABnzbd-console from a command prompt
and add the -w1 parameter.
That will show all logging in the command window.
Make sure that you are not downloading at the same time.
Try a small NZB or else you won't find the api call event.

Okay, I just tried this, and I think I missed something. When you say it would show all logging in the command window, do you mean the command prompt window itself?

When I typed "sabnzbd -w1" (or "sabnzbd -w 1", for that matter) and hit enter, it just launches SABnzbd, and gives me another command prompt. Nothing shows up from sab in the command window.

Didn't see anything new in the logs, either.

Running 0.50 final on Windows 7, x64.

Am I looking in the wrong place?

Re: Categories not automatically setting priority on add

Posted: March 9th, 2010, 1:19 pm
by rudyb
Couldn't get "-w1" to work, so I grabbed a port sniffer.

It looks like Episode Butler is sending (for example):

Code: Select all

GET /sabnzbd/api?ma_password=<password>&cat=TV-New&pp=-1&mode=addid&ma_username=<username>&apikey=<apiKey>&name=5582460 HTTP/1.1??User-Agent: Jakarta Commons-HttpClient/3.0.1??Host: <myhost>:<myport>??Cookie: $Version=0; session_id=4a7e2e79dbc247d65ba53ea8c687bd5bb598797d; $Path=/????
So, I'm assuming the "pp" is post-processing. If so, I'm not seeing where a priority is being set.

Am I missing something?

Re: Categories not automatically setting priority on add

Posted: March 9th, 2010, 2:03 pm
by shypike
Actually, will be solved in release 0.5.1, because of this ticket:
https://trac2.assembla.com/SABnzbd/ticket/399

Didn't realize this problem was in the API too.

Re: Categories not automatically setting priority on add

Posted: March 9th, 2010, 5:32 pm
by rudyb
Very cool.

Thanks for the heads up!

Sorry if I was being a pest about it.

:)