Page 1 of 1

Better/Smarter Sample Handling

Posted: March 27th, 2011, 7:01 pm
by Stewge
I ran into a problem the other day when I discovered one of my TV shows had an episode which had the word "sample" (part of the episode name) in it.  I can imagine that other TV shows with an episode name which happens to contain "sample", as well as movies and other possibilities, would cause problems.

Since I've configured sabnzbd to automatically ignore sample files, basically the entire NZB is skipped but post-processing reports it as a success.  The only way I could get around this was to pause all other NZBs, disable the sample handling, download said episode, then re-enable sample handling and all other NZBs in the queue.

Would it be possible to handle samples based on percentage of overall NZB size?

e.g.
If a split archive adds up to less than 20% of the NZB total size AND contains the word "sample", it's pretty much certain to be a sample file, then ignore/delete afterwards.
If a split archive containing "sample" makes up more than say, 60%, of the total NZB size, it is downloaded.

I haven't looked at the code for sabnzbd at all, but the basic logic involved is fairly easy.  I might see if I can come up with something that handles it.
I'm not quite sure how the pre-queue scripting fits in at the moment (only very new to sabnzbd), but that would seem to be a good place to implement the functionality before merging it directly into sabnzbd.

Re: Better/Smarter Sample Handling

Posted: March 28th, 2011, 2:14 am
by shypike
Doing all this for an occasional mismatch?

BTW: the pre-queue script cannot manipulate the actual NZB, only the parameters.