Page 1 of 1

User Defined Categories Script

Posted: May 20th, 2010, 9:00 am
by rdabba82es
Hi,

I have changed the default TV Category to associate with the alt.binaries.teevee group and added a corresponding post processing script.  When I manually add an nzb (from this group) to sabnzbd it automatically associates the downloading nzb with the TV Category (as expected).  But it does not change the post processing script to be the one that I defined for the TV Category (I have to manually change it).  Am I doing something wrong or is this a bug?

Cheers

Re: User Defined Categories Script

Posted: May 20th, 2010, 9:19 am
by shypike
It should work like you expect it to work, so I will look into this.
Are you using 0.5.2 ?

Do you have a default script set in Config->Switches ?
If so, set it to None. That may help.

Re: User Defined Categories Script

Posted: May 20th, 2010, 3:36 pm
by rdabba82es
Yep sure am.  Never used to have a default script but when I noticed this problem I set one as a workaround.

Re: User Defined Categories Script

Posted: May 20th, 2010, 5:08 pm
by shypike
Can you check the NZB file itself?
I suspect that it's a cross-posted one, so it has multiple groups.
SABnzbd only checks the first group it sees.

I'll see if I can fix this.
Cross-posts will remain a bit tricky when you have both groups in two different categories.

Re: User Defined Categories Script

Posted: May 20th, 2010, 5:26 pm
by rdabba82es
nzb had the following group xml section:

 
     alt.binaries.teevee
     alt.binaries.multimedia
   

So the first group was the one I specified in the User Defined Category group field.  Also it's a bit weird how it managed to resolve the Category to the right one ('TV').  Surely if it didn't find the 'alt.binaries.teevee' group in the queue it would not have set it to 'TV' but left it as the default values.  Will manually edit the nzb xml and try it with just a single group 'alt.binaries.teevee'....



Okay, changed the file to have just the one group entry 'alt.binaries.teevee' and started the download.  My Userdefined entry had 'alt.binaries.teevee' mapping to the TV Category.  When I check the active download; Category is 'TV' and script is 'none' (I had removed my default script value from switches).  Cancelled download.

I then changed the User defined entry group field to 'alt.binaries.teevee1' and repeated.  This caused the active download to have Category 'None' and Script 'none' which is what I would expect as obviously the nzb had the group 'alt.binaries.teevee' not 'alt.binaries.teevee1'.

Re: User Defined Categories Script

Posted: May 21st, 2010, 7:52 am
by shypike
The bug I uncovered is rather subtle.
Each file in the NZB has a list of groups.
The bug is that at the end of the NZB, SABnzbd only keeps
the group list of the last file.
If this group list is different from the other files, the category assignment fails.
I first thought that only the first group was checked, but that's not the issue.

Re: User Defined Categories Script

Posted: May 21st, 2010, 8:29 am
by rdabba82es
So if the nzb file only has one group for all of the individual message groups then it should work.  I will edit one and give it a go.  If this is the case though how come the category assignment is working but the script assignment is not?

Re: User Defined Categories Script

Posted: May 21st, 2010, 8:52 am
by shypike
That's an error that I cannot reproduce.
In fact what I described is a bug I found while checking your complaint.
If the group is the sole source of the category, the script will follow automatically.

Re: User Defined Categories Script

Posted: May 21st, 2010, 8:59 am
by rdabba82es
Thanks for looking into it.  I will go back to basics and see if I can get any further.