run user script even if duplicate detected

Want something added? Ask for it here.
Post Reply
mmesh
Newbie
Newbie
Posts: 4
Joined: June 21st, 2012, 9:02 am

run user script even if duplicate detected

Post by mmesh »

Hi!

Would it be possible to add an option to Queue -> Detect Duplicate Downloads that would allow sabnzbd to run a user script for already downloaded files if duplicate download was detected?

I have set sabnzbdplus on internet server to which couple of remote users (sickbeard) are connecting and most of the items that are triggered are duplicate. But they both are using different categories for the same items and each of them need to run their own post process script.

Is it possible?
I looked a bit into the code and as far as I can see it would be a simple call to external_processing method. But I don't know how to prepare arguments for this method at this part of code in sabnzbd/nzbstuff.py:

Code: Select all

        if duplicate and cfg.no_dupes() == 1:
            logging.warning(Ta('Ignoring duplicate NZB "%s" - category [%s], script [%s]'), (filename, self.cat, self.script))
            self.purge_data(keep_basic=False)
            raise TypeError
Or does one need to propagate more down to sabnzbd/postproc.py skipping somehow over redownload and other postprocess steps before running user defined post script.

Some pointers or info, please?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: run user script even if duplicate detected

Post by shypike »

Not exactly a very common use case, is it?
An alternative is to make a pre-queue script and use it to do
your own duplicate checking and whatever is needed in such a case.
See the Wiki for more info.
mmesh
Newbie
Newbie
Posts: 4
Joined: June 21st, 2012, 9:02 am

Re: run user script even if duplicate detected

Post by mmesh »

OK. I'll look into pre-queue scripts and try to solve it there...

Thanks.
Post Reply