Skip to content

Commit

Permalink
Add: manifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
dnzbk committed Jan 11, 2024
1 parent 293ea8a commit 157777d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 40 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
> **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 NZBGet v23 and above.
For older versions of NZBGet please use [v2.0](https://github.com/nzbgetcom/Extension-FakeDetector/releases/tag/v2.0) release.

> **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.
> **Note:** This script is compatible with python 3.8.x and above.
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.

> **Note:** [Here](https://github.com/nzbgetcom/nzbget/discussions/56) you can discuss problems with different versions of Python.

# FakeDetector
Fake detection [script](https://nzbget.com/documentation/extension-scripts/) for [NZBGet](https://nzbget.com).
Expand All @@ -18,5 +19,3 @@ Authors:
Detects 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.

For more info and support please visit forum topic [PP-Script FakeDetector](http://nzbget.net/forum/viewtopic.php?f=8&t=1394).
34 changes: 0 additions & 34 deletions FakeDetector.py → 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 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": "3.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 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 + '/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 157777d

Please sign in to comment.