Pre-Queue Script

Come up with a useful post-processing script? Share it here!
Post Reply
Marble68
Newbie
Newbie
Posts: 2
Joined: December 6th, 2012, 2:18 pm

Pre-Queue Script

Post by Marble68 »

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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Pre-Queue Script

Post by shypike »

The script should have an exit value of 0
and return "1" or "0" on stdout.
Marble68
Newbie
Newbie
Posts: 2
Joined: December 6th, 2012, 2:18 pm

Re: Pre-Queue Script

Post by Marble68 »

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!)
th3joker
Jr. Member
Jr. Member
Posts: 64
Joined: January 25th, 2008, 8:15 am

Re: Pre-Queue Script

Post by th3joker »

A shell script for linux that does that would be super cool :-)
Post Reply