Page 1 of 1

Addurl with nice nzb name

Posted: April 17th, 2010, 4:38 pm
by amolenk
Hi,

I'm trying to add an NZB to SAB using the Add by Url API function. I want to pass along a custom name for my NZB for which I should specify an nzbname=value pair according to the documentation. However, it seems like SAB is totally ignoring the nzbname parameter. I only see the original NZB name in the queue.

This is what my request looks like:
http://localhost:8080/sabnzbd/api?apike ... me=NEWNAME

Any ideas what I'm doing wrong here?

Thanks

(Using 0.5.0 Final on Windows)

Re: Addurl with nice nzb name

Posted: April 18th, 2010, 3:37 am
by Percius
I was searching for an answer to this very question. It turns out for my case and probably for yours that it is ignoring the input because your nzb is from one of these sites

    if 'nzbindex.nl/' in url or 'nzbindex.com/' in url or 'nzbclub.com/' in url:
        nzbname = ''

this code is in init.py on line 377 of my version. I have not yet traced to see WHY its there. I suspect that it has to do with the auto naming. In my case the NZB name sabnzbd has is shorter then the input file. I.E. it was cleaned up. Thats all fine and dandy, but I am setting a name for a reason.

Hope this helps

Re: Addurl with nice nzb name

Posted: April 18th, 2010, 5:49 am
by amolenk
That explains a lot, the NZB files I'm testing with are indeed from nzbindex.nl. Let's hope a future release will allow us to override the NZB name!

For now, I'll simply download the NZB file, rename it and copy it to the watched NZB import folder.

Thanks!

Re: Addurl with nice nzb name

Posted: April 18th, 2010, 7:35 am
by shypike
There was a good reason that this exception was added.
It has to do with the over-the-top names coming from the RSS feeds of these sites.
I'll see if I can move the filtering, because now it also affects the API.