mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
added option no_extract_failed. Fixes #1129
This commit is contained in:
parent
dcd99da19e
commit
c94731bcbb
11 changed files with 47 additions and 8 deletions
|
@ -28,6 +28,8 @@
|
||||||
check_media = 1
|
check_media = 1
|
||||||
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.
|
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectories by mistake.
|
||||||
safe_mode = 1
|
safe_mode = 1
|
||||||
|
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 will attempt to extract and verify if media is present.
|
||||||
|
no_extract_failed = 0
|
||||||
|
|
||||||
[Posix]
|
[Posix]
|
||||||
### Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.
|
### Process priority setting for External commands (Extractor and Transcoder) on Posix (Unix/Linux/OSX) systems.
|
||||||
|
|
|
@ -100,6 +100,7 @@ GIT_BRANCH = None
|
||||||
GIT_REPO = None
|
GIT_REPO = None
|
||||||
FORCE_CLEAN = None
|
FORCE_CLEAN = None
|
||||||
SAFE_MODE = None
|
SAFE_MODE = None
|
||||||
|
NOEXTRACTFAILED = None
|
||||||
|
|
||||||
NZB_CLIENTAGENT = None
|
NZB_CLIENTAGENT = None
|
||||||
SABNZBDHOST = None
|
SABNZBDHOST = None
|
||||||
|
@ -216,7 +217,7 @@ __INITIALIZED__ = False
|
||||||
|
|
||||||
def initialize(section=None):
|
def initialize(section=None):
|
||||||
global NZBGET_POSTPROCESS_ERROR, NZBGET_POSTPROCESS_NONE, NZBGET_POSTPROCESS_PARCHECK, NZBGET_POSTPROCESS_SUCCESS, \
|
global NZBGET_POSTPROCESS_ERROR, NZBGET_POSTPROCESS_NONE, NZBGET_POSTPROCESS_PARCHECK, NZBGET_POSTPROCESS_SUCCESS, \
|
||||||
NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, \
|
NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, NOEXTRACTFAILED, \
|
||||||
NZBTOMEDIA_BRANCH, NZBTOMEDIA_VERSION, NEWEST_VERSION, NEWEST_VERSION_STRING, VERSION_NOTIFY, SYS_ARGV, CFG, \
|
NZBTOMEDIA_BRANCH, NZBTOMEDIA_VERSION, NEWEST_VERSION, NEWEST_VERSION_STRING, VERSION_NOTIFY, SYS_ARGV, CFG, \
|
||||||
SABNZB_NO_OF_ARGUMENTS, SABNZB_0717_NO_OF_ARGUMENTS, CATEGORIES, TORRENT_CLIENTAGENT, USELINK, OUTPUTDIRECTORY, \
|
SABNZB_NO_OF_ARGUMENTS, SABNZB_0717_NO_OF_ARGUMENTS, CATEGORIES, TORRENT_CLIENTAGENT, USELINK, OUTPUTDIRECTORY, \
|
||||||
NOFLATTEN, UTORRENTPWD, UTORRENTUSR, UTORRENTWEBUI, DELUGEHOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \
|
NOFLATTEN, UTORRENTPWD, UTORRENTUSR, UTORRENTWEBUI, DELUGEHOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \
|
||||||
|
@ -319,6 +320,7 @@ def initialize(section=None):
|
||||||
FFMPEG_PATH = CFG["General"]["ffmpeg_path"]
|
FFMPEG_PATH = CFG["General"]["ffmpeg_path"]
|
||||||
CHECK_MEDIA = int(CFG["General"]["check_media"])
|
CHECK_MEDIA = int(CFG["General"]["check_media"])
|
||||||
SAFE_MODE = int(CFG["General"]["safe_mode"])
|
SAFE_MODE = int(CFG["General"]["safe_mode"])
|
||||||
|
NOEXTRACTFAILED = int(CFG["General"]["no_extract_failed"])
|
||||||
|
|
||||||
# Check for updates via GitHUB
|
# Check for updates via GitHUB
|
||||||
if versionCheck.CheckVersion().check_for_new_version():
|
if versionCheck.CheckVersion().check_for_new_version():
|
||||||
|
|
|
@ -116,8 +116,12 @@ class autoProcessMovie(object):
|
||||||
ssl = int(cfg.get("ssl", 0))
|
ssl = int(cfg.get("ssl", 0))
|
||||||
web_root = cfg.get("web_root", "")
|
web_root = cfg.get("web_root", "")
|
||||||
remote_path = int(cfg.get("remote_path", 0))
|
remote_path = int(cfg.get("remote_path", 0))
|
||||||
extract = int(cfg.get("extract", 0))
|
|
||||||
protocol = "https://" if ssl else "http://"
|
protocol = "https://" if ssl else "http://"
|
||||||
|
status = int(status)
|
||||||
|
if status == 1 and core.NOEXTRACTFAILED:
|
||||||
|
extract = 0
|
||||||
|
else:
|
||||||
|
extract = int(cfg.get("extract", 0))
|
||||||
|
|
||||||
baseURL = "{0}{1}:{2}{3}/api/{4}".format(protocol, host, port, web_root, apikey)
|
baseURL = "{0}{1}:{2}{3}/api/{4}".format(protocol, host, port, web_root, apikey)
|
||||||
if not server_responding(baseURL):
|
if not server_responding(baseURL):
|
||||||
|
@ -163,7 +167,6 @@ class autoProcessMovie(object):
|
||||||
good_files = 0
|
good_files = 0
|
||||||
num_files = 0
|
num_files = 0
|
||||||
# Check video files for corruption
|
# Check video files for corruption
|
||||||
status = int(status)
|
|
||||||
for video in listMediaFiles(dirName, media=True, audio=False, meta=False, archives=False):
|
for video in listMediaFiles(dirName, media=True, audio=False, meta=False, archives=False):
|
||||||
num_files += 1
|
num_files += 1
|
||||||
if transcoder.isVideoGood(video, status):
|
if transcoder.isVideoGood(video, status):
|
||||||
|
|
|
@ -51,8 +51,12 @@ class autoProcessMusic(object):
|
||||||
ssl = int(cfg.get("ssl", 0))
|
ssl = int(cfg.get("ssl", 0))
|
||||||
web_root = cfg.get("web_root", "")
|
web_root = cfg.get("web_root", "")
|
||||||
remote_path = int(cfg.get("remote_path", 0))
|
remote_path = int(cfg.get("remote_path", 0))
|
||||||
extract = int(cfg.get("extract", 0))
|
|
||||||
protocol = "https://" if ssl else "http://"
|
protocol = "https://" if ssl else "http://"
|
||||||
|
status = int(status)
|
||||||
|
if status == 1 and core.NOEXTRACTFAILED:
|
||||||
|
extract = 0
|
||||||
|
else:
|
||||||
|
extract = int(cfg.get("extract", 0))
|
||||||
|
|
||||||
url = "{0}{1}:{2}{3}/api".format(protocol, host, port, web_root)
|
url = "{0}{1}:{2}{3}/api".format(protocol, host, port, web_root)
|
||||||
if not server_responding(url):
|
if not server_responding(url):
|
||||||
|
|
|
@ -79,7 +79,11 @@ class autoProcessTV(object):
|
||||||
force = int(cfg.get("force", 0))
|
force = int(cfg.get("force", 0))
|
||||||
delete_on = int(cfg.get("delete_on", 0))
|
delete_on = int(cfg.get("delete_on", 0))
|
||||||
ignore_subs = int(cfg.get("ignore_subs", 0))
|
ignore_subs = int(cfg.get("ignore_subs", 0))
|
||||||
extract = int(cfg.get("extract", 0))
|
status = int(failed)
|
||||||
|
if status == 1 and core.NOEXTRACTFAILED:
|
||||||
|
extract = 0
|
||||||
|
else:
|
||||||
|
extract = int(cfg.get("extract", 0))
|
||||||
|
|
||||||
if not os.path.isdir(dirName) and os.path.isfile(dirName): # If the input directory is a file, assume single file download and split dir/name.
|
if not os.path.isdir(dirName) and os.path.isfile(dirName): # If the input directory is a file, assume single file download and split dir/name.
|
||||||
dirName = os.path.split(os.path.normpath(dirName))[0]
|
dirName = os.path.split(os.path.normpath(dirName))[0]
|
||||||
|
@ -117,7 +121,6 @@ class autoProcessTV(object):
|
||||||
flatten(dirName)
|
flatten(dirName)
|
||||||
|
|
||||||
# Check video files for corruption
|
# Check video files for corruption
|
||||||
status = int(failed)
|
|
||||||
good_files = 0
|
good_files = 0
|
||||||
num_files = 0
|
num_files = 0
|
||||||
for video in listMediaFiles(dirName, media=True, audio=False, meta=False, archives=False):
|
for video in listMediaFiles(dirName, media=True, audio=False, meta=False, archives=False):
|
||||||
|
|
|
@ -267,8 +267,8 @@ class ConfigObj(configobj.ConfigObj, Section):
|
||||||
CFG_NEW[section][option] = value
|
CFG_NEW[section][option] = value
|
||||||
|
|
||||||
section = "General"
|
section = "General"
|
||||||
envKeys = ['AUTO_UPDATE', 'CHECK_MEDIA', 'SAFE_MODE']
|
envKeys = ['AUTO_UPDATE', 'CHECK_MEDIA', 'SAFE_MODE', 'NO_EXTRACT_FAILED']
|
||||||
cfgKeys = ['auto_update', 'check_media', 'safe_mode']
|
cfgKeys = ['auto_update', 'check_media', 'safe_mode', 'no_extract_failed']
|
||||||
for index in range(len(envKeys)):
|
for index in range(len(envKeys)):
|
||||||
key = 'NZBPO_{index}'.format(index=envKeys[index])
|
key = 'NZBPO_{index}'.format(index=envKeys[index])
|
||||||
if key in os.environ:
|
if key in os.environ:
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
||||||
#safe_mode=1
|
#safe_mode=1
|
||||||
|
|
||||||
|
# Disable additional extraction checks for failed (0, 1).
|
||||||
|
#
|
||||||
|
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 this will attempt to extract and verify if media is present.
|
||||||
|
#no_extract_failed = 0
|
||||||
|
|
||||||
## CouchPotato
|
## CouchPotato
|
||||||
|
|
||||||
# CouchPotato script category.
|
# CouchPotato script category.
|
||||||
|
|
|
@ -25,6 +25,11 @@
|
||||||
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
||||||
#safe_mode=1
|
#safe_mode=1
|
||||||
|
|
||||||
|
# Disable additional extraction checks for failed (0, 1).
|
||||||
|
#
|
||||||
|
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 this will attempt to extract and verify if media is present.
|
||||||
|
#no_extract_failed = 0
|
||||||
|
|
||||||
## HeadPhones
|
## HeadPhones
|
||||||
|
|
||||||
# HeadPhones script category.
|
# HeadPhones script category.
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
||||||
#safe_mode=1
|
#safe_mode=1
|
||||||
|
|
||||||
|
# Disable additional extraction checks for failed (0, 1).
|
||||||
|
#
|
||||||
|
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 this will attempt to extract and verify if media is present.
|
||||||
|
#no_extract_failed = 0
|
||||||
|
|
||||||
## CouchPotato
|
## CouchPotato
|
||||||
|
|
||||||
# CouchPotato script category.
|
# CouchPotato script category.
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
||||||
#safe_mode=1
|
#safe_mode=1
|
||||||
|
|
||||||
|
# Disable additional extraction checks for failed (0, 1).
|
||||||
|
#
|
||||||
|
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 this will attempt to extract and verify if media is present.
|
||||||
|
#no_extract_failed = 0
|
||||||
|
|
||||||
## NzbDrone
|
## NzbDrone
|
||||||
|
|
||||||
# NzbDrone script category.
|
# NzbDrone script category.
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
# Enable/Disable a safety check to ensure we don't process all downloads in the default_downloadDirectory by mistake.
|
||||||
#safe_mode=1
|
#safe_mode=1
|
||||||
|
|
||||||
|
# Disable additional extraction checks for failed (0, 1).
|
||||||
|
#
|
||||||
|
# Turn this on to disable additional extraction attempts for failed downloads. Default = 0 this will attempt to extract and verify if media is present.
|
||||||
|
#no_extract_failed = 0
|
||||||
|
|
||||||
## SickBeard
|
## SickBeard
|
||||||
|
|
||||||
# SickBeard script category.
|
# SickBeard script category.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue