Page 1 of 1

Script Breaks +Delete

Posted: July 9th, 2011, 4:26 pm
by bnevets27
I just made a little post-processing script to copy the downloaded file to another location but I noticed that I now still have all the *.par and *.par2 files. I downloaded a file without running the post-processing and sabnzbd deleted all the *.par and *.par2 files as it should.

So it looks like running a(my) post-processing script breaks sabnzbds ability to delete *.par and *.par2 files? As far as I understand, file is downloaded, verified, repaired, pars are deleted, folder is cleaned based on the clean up list and the the script is run. So I don't understand how the script is effecting par file deletion.

Re: Script Breaks +Delete

Posted: July 9th, 2011, 4:40 pm
by shypike
SABnzbd only deletes par2 files that have been used to actually check or repair data.
Often NZB files contain some spurious par2 files, these are not automatically deleted.
You can remove those using the clean list in Config->General.

Re: Script Breaks +Delete

Posted: July 9th, 2011, 4:50 pm
by bnevets27
The par2 files that sabnzbd isn't deleting are the par files for the actual movie, not spurious files. I can double check on the exact same movie but I expect the same results...

I did add par2 to the clean up list and that works just fine. I don't think it will cause problems... I just don't get how the script could have broke sabnzbd par2 file deletion. Possibly a bug? Or is it expected behavior?

Re: Script Breaks +Delete

Posted: July 9th, 2011, 5:01 pm
by shypike
SABnzbd runs cleanup before and after the script.
Obviously when your script moves the files, the last cleanup will not work.
BTW: is this option on? Config->Switches->"Enable Par Cleanup"

Re: Script Breaks +Delete

Posted: July 9th, 2011, 6:09 pm
by bnevets27
Yup "Enable Par Cleanup" is on.

Well the the par2 files are being deleted for both the original and copied locations, when added to the clean up list, so the clean up task is doing it's job just fine. Its just funny that "Enable Par Cleanup" doesn't work when having the script run.

Re: Script Breaks +Delete

Posted: July 10th, 2011, 2:42 am
by shypike
SABnzbd may occasionally miss cleaning up some par2 files in the post-repair phase.
This is because it's a bit too paranoid in not wanting to delete files that might still be needed.
Having a script or not doesn't make a difference.
We're looking at a different method of doing verify/repairs, that will take care of this too.

The extension-based clean up shouldn't miss a beat though.
But it will not clean up any location outside the job's original folder.

Re: Script Breaks +Delete

Posted: July 10th, 2011, 1:53 pm
by bnevets27
I would rather sabnzbd be paranoid then overly clean up files. The extension-based clean up works flawlessly. Thank you for the quick and great responses. Also thank you and everyone else involved in sabnzbd, its an amazing program that is better then you can image and gets better everyday. Thanks for all the hard work. ;D