mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
remove duplicate parameters.
This commit is contained in:
parent
9d3f039a64
commit
88b101856e
4 changed files with 3 additions and 13 deletions
|
@ -304,7 +304,6 @@
|
|||
enabled = 0
|
||||
Torrent_NoLink = 0
|
||||
extract = 1
|
||||
video_corruption_check = 0
|
||||
#Enable if you are sending commands to a remote server for this category
|
||||
remote_path = 0
|
||||
#What extension do you want to process? Specify all the extension, or use "ALL" to process all files.
|
||||
|
|
|
@ -421,11 +421,6 @@
|
|||
# category that gets called for post-processing with user script (accepts "UNCAT", "ALL", or a defined category).
|
||||
#usCategory=mine
|
||||
|
||||
# Video Corruptio Check (0,1).
|
||||
#
|
||||
# Check video for corruption.
|
||||
#usvideo_corruption_check=0
|
||||
|
||||
# User Script Remote Path (0,1).
|
||||
#
|
||||
# Script calls commands on another system.
|
||||
|
|
|
@ -397,8 +397,8 @@ class ConfigObj(configobj.ConfigObj, Section):
|
|||
|
||||
section = "UserScript"
|
||||
envCatKey = 'NZBPO_USCATEGORY'
|
||||
envKeys = ['USVIDEO_CORRUPTION_CHECK', 'USREMOTE_PATH', 'USER_SCRIPT_MEDIAEXTENSIONS', 'USER_SCRIPT_PATH', 'USER_SCRIPT_PARAM', 'USER_SCRIPT_RUNONCE', 'USER_SCRIPT_SUCCESSCODES', 'USER_SCRIPT_CLEAN', 'USDELAY']
|
||||
cfgKeys = ['video_corruption_check', 'remote_path', 'user_script_mediaExtensions', 'user_script_path', 'user_script_param', 'user_script_runOnce', 'user_script_successCodes', 'user_script_clean', 'delay']
|
||||
envKeys = ['USER_SCRIPT_MEDIAEXTENSIONS', 'USER_SCRIPT_PATH', 'USER_SCRIPT_PARAM', 'USER_SCRIPT_RUNONCE', 'USER_SCRIPT_SUCCESSCODES', 'USER_SCRIPT_CLEAN', 'USDELAY', 'USREMOTE_PATH']
|
||||
cfgKeys = ['user_script_mediaExtensions', 'user_script_path', 'user_script_param', 'user_script_runOnce', 'user_script_successCodes', 'user_script_clean', 'delay', 'remote_path']
|
||||
if os.environ.has_key(envCatKey):
|
||||
for index in range(len(envKeys)):
|
||||
key = 'NZBPO_' + envKeys[index]
|
||||
|
|
|
@ -19,10 +19,6 @@ def external_script(outputDestination, torrentName, torrentLabel, settings):
|
|||
nzbtomedia.USER_SCRIPT = settings["user_script_path"]
|
||||
except:
|
||||
nzbtomedia.USER_SCRIPT = None
|
||||
try:
|
||||
nzbtomedia.USER_SCRIPT_VIDEO_CHECK = int(settings["video_corruption_check"])
|
||||
except:
|
||||
nzbtomedia.USER_SCRIPT_VIDEO_CHECK = 0
|
||||
try:
|
||||
nzbtomedia.USER_SCRIPT_PARAM = settings["user_script_param"]
|
||||
if isinstance(nzbtomedia.USER_SCRIPT_PARAM, str): nzbtomedia.USER_SCRIPT_PARAM = nzbtomedia.USER_SCRIPT_PARAM.split(',')
|
||||
|
@ -42,7 +38,7 @@ def external_script(outputDestination, torrentName, torrentLabel, settings):
|
|||
except:
|
||||
nzbtomedia.USER_SCRIPT_RUNONCE = 1
|
||||
|
||||
if nzbtomedia.USER_SCRIPT_VIDEO_CHECK:
|
||||
if nzbtomedia.CHECK_MEDIA:
|
||||
for video in listMediaFiles(outputDestination, media=True, audio=False, meta=False, archives=False):
|
||||
if transcoder.isVideoGood(video, 0):
|
||||
import_subs(video)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue