Failed downloads
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.
Failed downloads
Hey all,
Ive looked through the sabnzbd configuration and googled but I cant seem to find a answer - Is it possible to move/delete failed downloads?
In the sabnzbd webui there is a option to 'Purge failed nzb's and delete files' , is there anyway to run this after every download? Ive checked the log file after using the 'Purge failed nzb's and delete files' command to see if I could see any hints of how to acheive my goal but nothing was shown in the log file.
Any suggestions? Is this possible?
Thanks in advance.
Ive looked through the sabnzbd configuration and googled but I cant seem to find a answer - Is it possible to move/delete failed downloads?
In the sabnzbd webui there is a option to 'Purge failed nzb's and delete files' , is there anyway to run this after every download? Ive checked the log file after using the 'Purge failed nzb's and delete files' command to see if I could see any hints of how to acheive my goal but nothing was shown in the log file.
Any suggestions? Is this possible?
Thanks in advance.
Re: Failed downloads
If you really want it:
SABnzbd's API offers options to remove failed downloads. See http://wiki.sabnzbd.org/api#toc41
So you can trigger that from a curl one-liner. I tried this one:
... but that deleted my whole history, not only failed one ... :-(
And this one didn't work either:
So some experimenting is necessary.
As soon as you have the correct curl one-liner, you can put it in a post-processing script for the default category. Or you can put in a crontab entry so that it is run each x minutes.
HTH
SABnzbd's API offers options to remove failed downloads. See http://wiki.sabnzbd.org/api#toc41
So you can trigger that from a curl one-liner. I tried this one:
Code: Select all
curl -v 'http://localhost:8080/api?mode=history&name=delete&value=all&failed_only=1'
And this one didn't work either:
Code: Select all
sander@R540:~$ curl 'http://localhost:8080/api?mode=history&name=delete&failed_only=1'
error: expect one parameter
sander@R540:~$As soon as you have the correct curl one-liner, you can put it in a post-processing script for the default category. Or you can put in a crontab entry so that it is run each x minutes.
HTH
Re: Failed downloads
Thanks for your help and prompt reply sander - I now have a point to start my journey from
Time to do some reading.
Quick question, is there anyway to fail downloads on purpose? This would make testing alot easier.
Thanks again sander.
Quick question, is there anyway to fail downloads on purpose? This would make testing alot easier.
Thanks again sander.
Re: Failed downloads
That's easy: just set the job's priority to "Stop" after the first few files are in.teeedubb wrote: Quick question, is there anyway to fail downloads on purpose? This would make testing alot easier.
Re: Failed downloads
Thanks shypike, gonna give it a go now.
Re: Failed downloads
This command:
seems to delete the whole history, but will only delete the files of failed downloads. I tried a few variations but I was unable to clear only the failed history while leaving the completed history in place, but Im happy to have the the failed downloads deleted automatically.
Thanks for the help guys.
Code: Select all
curl -v 'http://localhost:8085/api?mode=history&name=delete&value=all&failed_only=1&del_files=1'Thanks for the help guys.
Re: Failed downloads
So same experience as I have. Hopefully Shypike can shine some light on this ...
Re: Failed downloads
I'm thinking the '&value=all' parameter is the key here, but I'm no expert. I tried replacing 'all' with 'failed_only' to no avail. I just had the idea to use 'failed'. I doubt it will work but its worth a shot. Googling this topic or the parameters I'm using isn't giving me much info.
Re: Failed downloads
It's on my to-check list, but you'll have to have some patience.
Re: Failed downloads
Thanks shypike.
While googling 'sabnzbd check api command' I can across another one of your posts which is related to this topic. (Isn't it weird that when I Google something unrelated I find what I'm after...)
http://forums.sabnzbd.org/viewtopic.php ... 44&p=77051
So it looks like the value option does need to be set to 'failed' and not failed_only and the failed_only option needs to be omitted.(apologies if I'm using the wrong terminology)
I'll test when I get home.
Thanks again.
While googling 'sabnzbd check api command' I can across another one of your posts which is related to this topic. (Isn't it weird that when I Google something unrelated I find what I'm after...)
http://forums.sabnzbd.org/viewtopic.php ... 44&p=77051
So it looks like the value option does need to be set to 'failed' and not failed_only and the failed_only option needs to be omitted.(apologies if I'm using the wrong terminology)
I'll test when I get home.
Thanks again.
[SOLVED] Failed downloads
The command
curl -v 'http://localhost:8085/api?mode=history& ... el_files=1'
as per the link in the above post works. It only deletes failed history + files, leaving complete history + files alone.
Time to celebrate
curl -v 'http://localhost:8085/api?mode=history& ... el_files=1'
as per the link in the above post works. It only deletes failed history + files, leaving complete history + files alone.
Time to celebrate
Re: [SOLVED] Failed downloads
Cool; it works for me too.teeedubb wrote:The command
curl -v 'http://localhost:8085/api?mode=history& ... el_files=1'
as per the link in the above post works. It only deletes failed history + files, leaving complete history + files alone.
Time to celebrate
Re: Failed downloads
That's the right way.
The documentation is incorrect and I'll change it.
Also, this function is rather weird in its details, but we cannot change without breaking existing tools.
The documentation is incorrect and I'll change it.
Also, this function is rather weird in its details, but we cannot change without breaking existing tools.
Re: Failed downloads
When I execute that command this is what I get:
I am running arch and installed this package 'aur/sabnzbd 0.7.16-1' .
Any ideas?
Code: Select all
# curl -v 'http://localhost:8080/api=myapikey?mode=history&name=delete&value=failed&del_files=1'
* Hostname was NOT found in DNS cache
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /api=myapikey?mode=history&name=delete&value=failed&del_files=1 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8080
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Sun, 16 Feb 2014 09:10:33 GMT
< Content-Length: 513
< Content-Type: text/html;charset=utf-8
* Server CherryPy/3.2.0 is not blacklisted
< Server: CherryPy/3.2.0
<
<html>
<head>
<script type="text/javascript">
<!--
location.href = "http://localhost:8080/sabnzbd"
//-->
</script>
</head>
<body><br/></body>
</html>
* Connection #0 to host localhost left intact
Any ideas?
Re: Failed downloads
You're using the wrong URL, it should be:
curl -v 'http://localhost:8080/sabnzbd/api?apike ... el_files=1'
curl -v 'http://localhost:8080/sabnzbd/api?apike ... el_files=1'

