Page 1 of 2
Add by fileupload not working with .gz
Posted: April 6th, 2012, 5:32 pm
by dogzipp
I have the API option of adding by file upload working fine, but it only works with NZB files. I tried uploading a GZ file, and it just choked (7.0b2).
I assume it *should* work, since the add by file path option says it supports nzb/rar/zip/gz files, so I guess the same extensions are supported for file upload?
Thanks
Re: Add by fileupload not working with .gz
Posted: April 6th, 2012, 9:17 pm
by dogzipp
Also, there seems to be a discrepancy on the results from 0.6 and 0.7
0.6 returns <Status>True</status> for a succeful upload.
0.7 returns <Status>0</status> and the nzo_id.
Maybe 0.7 should return TRUE as well, since 0 as a boolean means false.
Re: Add by fileupload not working with .gz
Posted: April 7th, 2012, 6:35 am
by shypike
You are right.
"addfile" and "addlocalfile" now return a status and a list of job identifiers.
Only the numerical status (where 0 is OK) as not been converted to a boolean (where True is OK).
Will be fixed in Beta3.
Re: Add by fileupload not working with .gz
Posted: April 7th, 2012, 5:36 pm
by dogzipp
Uploading .gz will be fixed too?
Re: Add by fileupload not working with .gz
Posted: April 8th, 2012, 3:36 am
by shypike
Except for the problem with the return value there was no problem uploading GZ files.
(The return value was incorrect for all uploads.)
Re: Add by fileupload not working with .gz
Posted: April 8th, 2012, 8:31 am
by dogzipp
Still cannot get it to work. Then I try to upload a .gz file I get status -2.
And on SABnzbd I get WARNING: Cannot read /tmp/tmp2v0GIe.gz
BTW, if I upload .gz directly it works fine.
Also I would like to request an option to specify a different /tmp directory from within the SABnzb config.
Re: Add by fileupload not working with .gz
Posted: April 8th, 2012, 9:15 am
by dogzipp
Uploading a 9MB nzb file, I got:
408 Request Time-out.
Yet the file uploads fine, and goes to the Queue. (tried 3 times with the same 408 result every time).
Re: Add by fileupload not working with .gz
Posted: April 8th, 2012, 9:39 am
by shypike
Is that 9M compressed or not?
What gives the timeout? Your program?
Re: Add by fileupload not working with .gz
Posted: April 8th, 2012, 9:53 am
by dogzipp
The 9M is uncompressed. The timeout is the Cherrypi response.
Re: Add by fileupload not working with .gz
Posted: April 9th, 2012, 3:19 am
by shypike
The whole operation must be completed within 60 seconds (default of the web framework we use).
This means that your system and/or connection are rather slow.
I can upload a 20M NZB to a slow server well within a minute.
BTW: most of the time is spent by SABnzbd processing the NZB file, so probably the line speed is not relevant.
I'll see if I can increase the time-out.
Given that it's an internal time-out for SABnzbd itself, extending it won't have negative side-effects.
Re: Add by fileupload not working with .gz
Posted: April 10th, 2012, 9:12 am
by dogzipp
Another question. Does the "addurl" option works with multiple files? If I want to upload 3 URLs at the same time perhaps? (multiple name, nzbname, cat and priority fields)
If not, can something like this be wishlisted? It would be beneficial if we could do everything with just one connection... Right now If I want to upload three files at the same time, I have to establish three different connections.
Re: Add by fileupload not working with .gz
Posted: April 10th, 2012, 9:39 am
by shypike
I've done some experiments.
You have at least 5 minutes to complete the transaction with the current settings.
That should be enough.
I can tweak the setting, but I suspect that something else is going on.
Have you timed the timeouts?
Lists of urls are not supported.
They would given even more timeout issues...
Re: Add by fileupload not working with .gz
Posted: April 10th, 2012, 9:44 am
by dogzipp
I will try again. Of course, transmit time could be reduced (a lot), if I could upload GZ files ;-) Did you test that also?
As for multiple URLs. I tought sabnzbd returns True inmediately as acknowledge it received the URL, and then it later tries to download it At leas that's my experience. I upload the URL, get the OK, and I see a couple of seconds afterwards SABnzbd tries to fetch the NZB file.
I don't see why receiving several URLs at once would cause a Timeout. Just return status TRUE and queue them as well.
Thanks
Re: Add by fileupload not working with .gz
Posted: April 10th, 2012, 2:50 pm
by shypike
GZ files are supported.
Beta3 will support multiple "name" parameters for the "addid" and "addurl" API calls.
Re: Add by fileupload not working with .gz
Posted: April 10th, 2012, 3:14 pm
by dogzipp
Great news. Any ETA for b3?
(I suppose that you also need to specify multiple nzbname, priority and cats too?)