Addurl with nice nzb name

Get help with all aspects of SABnzbd
Forum rules
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.
Post Reply
amolenk
Newbie
Newbie
Posts: 2
Joined: April 17th, 2010, 4:25 pm

Addurl with nice nzb name

Post 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)
Last edited by amolenk on April 17th, 2010, 4:40 pm, edited 1 time in total.
Percius
Newbie
Newbie
Posts: 3
Joined: April 18th, 2010, 3:34 am

Re: Addurl with nice nzb name

Post 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
amolenk
Newbie
Newbie
Posts: 2
Joined: April 17th, 2010, 4:25 pm

Re: Addurl with nice nzb name

Post 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!
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Addurl with nice nzb name

Post 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.
Post Reply