remove duplicate parameters.

This commit is contained in:
clinton-hall 2014-07-05 07:26:29 +09:30
commit 88b101856e
4 changed files with 3 additions and 13 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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]

View file

@ -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)