Page 7 of 8

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 01 Feb 2016, 12:04
by prinz2311
I think it would be nice to add the signature:

Code: Select all

### QUEUE EVENTS: NZB_ADDED, NZB_DOWNLOADED, FILE_DOWNLOADED
to the script, so that it's not called in case of the 2 new events: NZB_DELETED, URL_COMPLETED were it's exits anyways without doing anything.

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 10 May 2016, 20:43
by ezhik
If anybody is running into issues with PasswordDetector or FakeDetector complaining about:

ERROR Post-process-script PasswordDetector.py for **** failed (terminated with unknown status)
ERROR Post-process-script FakeDetector.py for **** failed (terminated with unknown status)

Most likely it is due to temp_file_name issue.

To fix this, open both files and update the following:

From:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/PasswordDetector/' + os.environ.get(Prefix + 'NZBID')

To:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/PasswordDetector/' + re.sub("\D", "", os.environ.get(Prefix + 'NZBID'))


Same for Fake Detector:

From:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/FakeDetector/' + os.environ.get(Prefix + 'NZBID')

to:
# Directory for storing list of tested files
tmp_file_name = os.environ.get('NZBOP_TEMPDIR') + '/FakeDetector/' + re.sub("\D", "", os.environ.get(Prefix + 'NZBID'))


PS. Encountered this with 16.4.

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 11 May 2016, 07:45
by hugbug
@ezhik:
Why would it be necessary?
"os.environ.get(Prefix + 'NZBID')" by definition contains only digits.

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 11 May 2016, 13:56
by ezhik
You would think so...

But in my case it was returning digits + characters.

Depending which scripts goes first (the first in order would complete OK), but the next one would return characters after the NZBID.



Both scripts were being executed in order, fakedetector and passworddetector and because both of them were using tmp_file_name variable it appears that was causing issues.

That's the only work around that I found.

For example it would be like /fakedetector/181050ector.py or /passworddetector/181050or.py

Something along those lines.

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 26 Aug 2016, 20:34
by konubywy
This script is not running correctly for me and I'm having difficulty seeing exactly where the problem may lie. I have a movie file that I know to contain both a media file and an executable file. The script does detect this and throws up a WARNING but fails to change the status to BAD/FAILURE. Without this FAILURE/BAD status nzbget continues to download the file when the expected behavior is to instead have it marked as FAILURE/BAD and remove it from the download queue. The relevant nzbget.log section is as follows:

Fri Aug 26 13:14:05 2016 INFO FakeDetector: Found executable MOVIENAME.2016.LIMITED.DVDRip.x264-XURl/Setup/Setup.exe
Fri Aug 26 13:14:05 2016 WARNING FakeDetector: Download has media files and executables
Fri Aug 26 13:14:05 2016 DETAIL Successfully downloaded MOVIENAME.2016.LIMITED.DVDRip.x264-XURl.cp(ttxxxxxxx)
Fri Aug 26 13:14:05 2016 DETAIL Successfully downloaded MOVIENAME.2016.LIMITED.DVDRip.x264-XURl.cp(ttxxxxxxx)
Fri Aug 26 13:14:05 2016 DETAIL Successfully downloaded MOVIENAME.2016.LIMITED.DVDRip.x264-XURl.cp(ttxxxxxxx)
Fri Aug 26 13:14:05 2016 DETAIL Successfully downloaded MOVIENAME.2016.LIMITED.DVDRip.x264-XURl.cp(ttxxxxxxx)
Fri Aug 26 13:14:05 2016 DETAIL Successfully downloaded MOVIENAME.2016.LIMITED.DVDRip.x264-XURl.cp(ttxxxxxxx)

...and so on until the file has completely downloaded and successfully run all other scripts; i.e., Par: SUCCESS Unpack: SUCCESS PasswordDetector: SUCCESS FakeDetector: SUCCESS nzbToCouchPotato: SUCCESS

Any ideas as to why I see the WARNING flag but the script fails to add the FAILURE/BAD flag?

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 26 Aug 2016, 20:50
by hugbug
Which version of nzbget? Can you please try the latest testing version, there was a fix in this regard.

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 26 Aug 2016, 21:32
by konubywy
I was on the Stable branch and updated to the Testing branch and the problem seems to have been fixed. Thank you for the "fixed hanging after marking as BAD from queue script" fix. It was driving me bonkers :evil: :arrow: :D

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 27 Nov 2016, 20:13
by dagoob
I suspect that if the new BannedExtensions setting is left blank this detects files with no extension? I had a couple of downloads marked bad which were fine other than being obfuscated filenames...

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 27 Nov 2016, 20:59
by hugbug
Can you please send me an example nzb? nzbget@gmail.com.

Re: [Queue-Script] FakeDetector - early detection of fake vi

Posted: 27 Nov 2016, 21:49
by hugbug
Fixed.
(no need to send example nzb)