safihre wrote: ↑December 5th, 2023, 4:49 am
You can bypass by setting the job to Force, either when adding or when the job is in the queue.
@djones: What if we run the duplicate detection again after the pre-queue result, only if it changed the name?
That seems reasonable.
Or what else would you like to do from the pre-queue script that isn't possible?
Indeed GuessIt is a black box, also to me. It just works, or sometimes it doesn't...
That's an interesting idea. Can queue smart duplicate checking somehow always be active rather for the queue items rather than checking only once when a new job comes in? Or maybe create a user option for how often to check (on a timer lets say).
For your reference, here is a shortened version of the pre-queue script I was using, "shortened" meaning my actual script has 90+ rename/substitute lines:
prequeue.py
Code: Select all
import sys
import re
try:
(scriptname, nzbname, postprocflags, category, script, prio, downloadsize, grouplist, showname, season, episodenumber, episodename, is_proper, resolution, decade, year, month, day, job_type) = sys.argv
downloadsize = int(downloadsize)
except:
sys.exit(1) # exit with 1 causes SABnzbd to ignore the output of this script
fwp = nzbname
fwp = nzbname.replace('...', '.').replace('..', '.')
fwp = re.sub('(?i)\.4k', '.2160p', fwp)
fwp = re.sub('(?i)-Obfuscated$', '', fwp)
fwp = re.sub('(?i).READ.NFO', '', fwp)
fwp = re.sub('(?i).com.', '.', fwp)
fwp = re.sub('(?i).par2', '', fwp)
print("1") # Accept
print(fwp)
print()
print()
print()
print()
print()
# 0 means OK
sys.exit(0)