Hi
I'm trying to upload a Nzb file to sab via the api from Android.
I've look all around the net and can't find an answer.
Thanks for any help.
Regards
Potman
Adding Nzb From Android
Forum rules
Help us help you:
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.
Re: Help With Categories
"via the api"?
You mean you have some Android app?
Did you set it up properly?
You mean you have some Android app?
Did you set it up properly?
Re: Adding Nzb From Android
Hi
Yes, I have an android app, that I can download Nzb files to the device, the problem I have is I
need to send the nzb from the app to sab.
I think its a http post request via mode=addfile but Im not sure.
Regards
Potman
Yes, I have an android app, that I can download Nzb files to the device, the problem I have is I
need to send the nzb from the app to sab.
I think its a http post request via mode=addfile but Im not sure.
Regards
Potman
Re: Adding Nzb From Android
Hi shypike
Any ideas on this ?
Sabcontrol on android can do it, I just can't seem to find out how.
The app has over 700,000 Nzbs avaliable, with a couple of thousand being added daily, and they all come direct from
Usenet.
Regards
Potman
Any ideas on this ?
Sabcontrol on android can do it, I just can't seem to find out how.
The app has over 700,000 Nzbs avaliable, with a couple of thousand being added daily, and they all come direct from
Usenet.
Regards
Potman
Re: Adding Nzb From Android
I can give you the CURL command to accomplish it.
This should give you an idea how to do it.
This should give you an idea how to do it.
Code: Select all
curl http://host:8080/sabnzbd/api -F apikey=APIKEY -F mode=addfile -F output=json -F "name=@d:\path\to\my\file.nzb"
Re: Adding Nzb From Android
Hi
thanks for the info, not really used curl in the past but will see If I can get if working.
Regards
Potman
thanks for the info, not really used curl in the past but will see If I can get if working.
Regards
Potman
Re: Adding Nzb From Android
Curl has some options to show what it is actually sending and receiving.
Re: Adding Nzb From Android
Hi
I've managed to craft a http post in basic4android, and when I check the sab logs
it matches the log entry's for the same file added by curl.
The curl one works and adds to sab and gives the return code
{"status":true,"nzo_ids":["SABnzbd_nzo_allw_s"]}
but the b4a fails with
{"status":false,"nzo_ids":[]}
Any idea what this error means ?
Regards
potman
I've managed to craft a http post in basic4android, and when I check the sab logs
it matches the log entry's for the same file added by curl.
The curl one works and adds to sab and gives the return code
{"status":true,"nzo_ids":["SABnzbd_nzo_allw_s"]}
but the b4a fails with
{"status":false,"nzo_ids":[]}
Any idea what this error means ?
Regards
potman
Re: Adding Nzb From Android
The "b4a" ?
Re: Adding Nzb From Android
basic4android application
Re: Help With Categories
The error means that no usable nzb file was received.
Re: Adding Nzb From Android
Hi shypike
Thanks for your help with this, got it working now, the issue was when reading
the nzb for the post request, there was a \r\n being added to the nzb post data,
which was making the nzb data invalid.
Regards
Potman
Thanks for your help with this, got it working now, the issue was when reading
the nzb for the post request, there was a \r\n being added to the nzb post data,
which was making the nzb data invalid.
Regards
Potman

