How to add an NZB from the command line
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.
-
- Newbie
- Posts: 8
- Joined: September 1st, 2010, 6:49 am
How to add an NZB from the command line
I am writing a .desktop file for sabnzbd, so I can just click on my NZBs to load them into SABnzbd. What I don't know is what URL I should call to add a file. Or should I invoke a python script?
Re: How to add an NZB from the command line
Which Operating System are you using?
-
- Newbie
- Posts: 8
- Joined: September 1st, 2010, 6:49 am
-
- Newbie
- Posts: 8
- Joined: September 1st, 2010, 6:49 am
Re: How to add an NZB from the command line
How do you do it in Windows? It must be somewhat the same, as python and the http calls are platform independent.
Re: How to add an NZB from the command line
On Windows SABnzbd can bind itself to the NZB extension.
I'm not sure how to do that on Linux.
From the command line you just start SABnzbd again with the nzb-path as the only parameter.
It will try to find out if another instance is running and pass the NZB.
You should either use the standard profile location ~/.sabnzbd or pass the same -f parameter as well.
I'm not sure how to do that on Linux.
From the command line you just start SABnzbd again with the nzb-path as the only parameter.
It will try to find out if another instance is running and pass the NZB.
You should either use the standard profile location ~/.sabnzbd or pass the same -f parameter as well.
Last edited by shypike on September 1st, 2010, 2:50 pm, edited 1 time in total.
-
- Newbie
- Posts: 8
- Joined: September 1st, 2010, 6:49 am
Re: How to add an NZB from the command line
I can't manage to get sabnzbd to load an nzb. I tried the following things:
python /opt/sabnzbd/SABnzbd.py test.nzb
python /opt/sabnzbd/SABnzbd.py test.nzb -f /opt/sabnzbd/sabnzbd.ini
sudo su - sabnzbd -c "python /opt/sabnzbd/SABnzbd.py -f /opt/sabnzbd/sabnzbd.ini -s localhost:8080 test.nzb"
The command only has to work when there is already an instance of sabnzbd running. I hope the solution is similar to my first attempt, because I can't specify a lot of customized parameters from a file association.
python /opt/sabnzbd/SABnzbd.py test.nzb
python /opt/sabnzbd/SABnzbd.py test.nzb -f /opt/sabnzbd/sabnzbd.ini
sudo su - sabnzbd -c "python /opt/sabnzbd/SABnzbd.py -f /opt/sabnzbd/sabnzbd.ini -s localhost:8080 test.nzb"
The command only has to work when there is already an instance of sabnzbd running. I hope the solution is similar to my first attempt, because I can't specify a lot of customized parameters from a file association.
Re: How to add an NZB from the command line
Personally I would setup a "Watched" Folder" in SABnzbd and use
a small script to copy the NZB into the Watched folder.
Associate the script with the .nzb extension.
a small script to copy the NZB into the Watched folder.
Associate the script with the .nzb extension.
-
- Newbie
- Posts: 8
- Joined: September 1st, 2010, 6:49 am
Re: How to add an NZB from the command line
Ok. I am trying to add this feature to a package, because I am the maintainer, so setting up a folder is not really going to work. I will try adding through the API now, although I would have preferred just calling the python file.
Re: How to add an NZB from the command line
Maybe this could be of use?