I wasn't 100% sure where to put this, but since it lives with post-processing....
I threw together a pre-queue script that will refuse (return 0) for duplicate episodes. (I just thew it together in VBScript for SABNZBD running on windows).
It works the first time it runs, but subsequently refuses everything. No matter what, the log says the pre-queue script has refused the file, even if when I manually run it it doesn't.
I examine the logs and if I run the script passing the parameters from the Pre-Queue call - the script works as expected.
It's really simple - if the name of the file is: "Robot Chicken S06E09 1080p WEB DL AAC2 0 H264 iT00NZ" the script will find the folder called "Robot Chicken" and then the Season folder (6) and then look for Episode 9.
My sorting is: Show Name\Season 1\Show Name - S01E05 - Episode Name [DTS].avi
So basically - under the Show Name folder - I can parse all sub files for "S06E09" and return 0 or 1.
Am I missing a step? Not terminating my script correctly?
Any suggestions are appreciated.
Pre-Queue Script
Re: Pre-Queue Script
The script should have an exit value of 0
and return "1" or "0" on stdout.
and return "1" or "0" on stdout.
Re: Pre-Queue Script
Exactly how I understand it. The script is ending gracefully.
I started piping what SABNZBD is passing to the script into a file - everything looks normal.
I will pipe the returned result, too, and see if it matches. (Dunno why I didn't think of that until now.. duh!)
I started piping what SABNZBD is passing to the script into a file - everything looks normal.
I will pipe the returned result, too, and see if it matches. (Dunno why I didn't think of that until now.. duh!)
Re: Pre-Queue Script
A shell script for linux that does that would be super cool :-)