Skip to content

Commit

Permalink
Add: manifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
dnzbk committed Dec 24, 2023
1 parent 293ea8a commit ef806eb
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 36 deletions.
34 changes: 0 additions & 34 deletions FakeDetector.py → FakeDetector/main.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

##############################################################################
### NZBGET QUEUE/POST-PROCESSING SCRIPT ###
### QUEUE EVENTS: NZB_ADDED, NZB_DOWNLOADED, FILE_DOWNLOADED

# Detect nzbs with fake media files.
#
# If a fake is detected the download is marked as bad. NZBGet removes
# the download from queue and (if option "DeleteCleanupDisk" is active) the
# downloaded files are deleted from disk. If duplicate handling is active
# (option "DupeCheck") then another duplicate is chosen for download
# if available.
#
# The status "FAILURE/BAD" is passed to other scripts and informs them
# about failure.
#
# PP-Script version: 1.7.
#
#
# NOTE: This script requires Python 3.9.x to be installed on your system


##############################################################################
### OPTIONS ###

# Banned extensions.
#
# Downloads which contain files with any of the following extensions will be marked as fake.
# Extensions must be separated by a comma (eg: .wmv, .divx).
#BannedExtensions=


### NZBGET QUEUE/POST-PROCESSING SCRIPT ###
##############################################################################


import os
import sys
Expand Down
39 changes: 39 additions & 0 deletions FakeDetector/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"main": "main.py",
"name": "FakeDetector",
"homepage": "https://github.com/nzbgetcom/Extension-FakeDetector",
"kind": "QUEUE/POST-PROCESSING",
"displayName": "Fake Detector",
"version": "2.0.0",
"author": "Andrey Prygunkov",
"license": "GNU",
"about": "Detect nzbs with fake media files.",
"queueEvents": "NZB_ADDED, NZB_DOWNLOADED, FILE_DOWNLOADED",
"requirements": [
"This script requires Python 3.8.x to be installed on your system"
],
"description": [
"If a fake is detected the download is marked as bad. NZBGet removes",
"the download from queue and (if option \"DeleteCleanupDisk\" is active) the",
"downloaded files are deleted from disk. If duplicate handling is active",
"(option \"DupeCheck\") then another duplicate is chosen for download if available.",
"",
"The status \"FAILURE/BAD\" is passed to other scripts and informs them about failure."
],
"options": [
{
"name": "BannedExtensions",
"displayName": "BannedExtensions",
"value": "",
"description": [
"BannedExtensions.",
"",
"Downloads which contain files with any of the following extensions will be marked as fake.",
"Extensions must be separated by a comma (eg: .wmv, .divx)."
],
"select": []
}
],
"commands": [],
"taskTime": ""
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
> **Note:** this repo is a fork of the original github [project](https://github.com/nzbget/FakeDetector)
> made by @hugbug.
> **Note:** This script is compatible with python 3.9.x and above.
> **Note:** This script is compatible with python 3.8.x and above.
> **Note:** If you need support for Python 2.x or older Python3.x versions please use [v1.7](https://github.com/nzbgetcom/Extension-FakeDetector/releases/tag/v1.7) release.
Expand Down
2 changes: 1 addition & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def clean_up():

def run_script():
sys.stdout.flush()
proc = subprocess.Popen([get_python(), root_dir + '/FakeDetector.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ.copy())
proc = subprocess.Popen([get_python(), root_dir + '/FakeDetector/main.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ.copy())
out, err = proc.communicate()
proc.pid
ret_code = proc.returncode
Expand Down

0 comments on commit ef806eb

Please sign in to comment.