Page 2 of 2

Re: Problems using API (Switch)

Posted: April 18th, 2012, 12:22 am
by dogzipp
The thinf is, when you're pushing 100 files, to diffent users at the same time, the quicker you connect, and disconnect the better, and more quickly you get through the queue.

That's why I am using addfile, just sending a URL and disconnecting, and letting the remote SABnzbd download the NZB file at their leisure, through my HTTP interface, which is much more capable of handling lots of simultaneous threads.

That's why I asked for multiple addfile, so I don't have make 5 different connections in succesion to a users SABnzbd to push their queued files, just one connection, a list of urls and categories, and done with it.

Right now I am managing the load of uploading URLs, but I only have a couple of hundred active users, so I am thinking ahead, as ways to uploading multiple URLs and cats, with only one connection. I love SABnzbs, and love that I have hundreds of users using it too, and I want to make everything more efficient for them. So they know I can push them a NZB file quickly, and not have a bottleneck on my side.

The remote xcat for each file would not be needed, if when SABnzbd fetches the NZB the "X-DNZB-Category" header is run through the users filters, and checked for wildcards as well. (right now it's being ignored as well).

If I just upload the files,

Re: Problems using API (Switch)

Posted: April 18th, 2012, 2:18 am
by shypike
Now I'm confused.
You say you're using "addfile" to send URLs to SABnzbd.
But addfile doesn't support URLs, you should use "addurl" for that and "addurl" supports multiple URLs.

Just checked the code: SABnzbd does look at the X-DNZB-Category header.
However due to a bug it will only honor it for nzbmatrix.com. I'll set that right.

Re: Problems using API (Switch)

Posted: April 18th, 2012, 12:49 pm
by shypike
Just checked again.
X-DNZB-Category is correctly handled for all sites that have it.
The value is mapped to a user category using the expression in the "Groups / Indexer tags" column.

Re: Problems using API (Switch)

Posted: April 18th, 2012, 3:10 pm
by zoggy
we've talked about this before in the nn channel, just make sure you do TV* for your groups forexample.

Re: Problems using API (Switch)

Posted: April 18th, 2012, 3:27 pm
by dogzipp
Shypike, I'll PM with an example.