added all params to external script. fixes #185

This commit is contained in:
clinton-hall 2013-11-10 07:07:36 +10:30
commit 05f7f90b15
2 changed files with 7 additions and 4 deletions

View file

@ -278,12 +278,15 @@ def external_script(outputDestination):
if param == "FN":
command.append(file)
continue
if param == "FP":
elif param == "FP":
command.append(filePath)
continue
if param == "DN":
elif param == "DN":
command.append(dirpath)
continue
else:
command.append(param)
continue
Logger.info("Running script %s on file %s.", command, filePath)
try:
p = Popen(command)

View file

@ -136,8 +136,8 @@ user_script_mediaExtensions = .mkv,.avi,.divx,.xvid,.mov,.wmv,.mp4,.mpg,.mpeg
#Specify the path of the script
user_script_path = /media/test/script/script.sh
#Specify the argument(s) passed to script, comma separated in order.
#for example FP,FN,DN for file path (absolute file name with path), file anme, absolute directory name (with path).
#So the result is /media/test/script/script.sh FP FN DN
#for example FP,FN,DN for file path (absolute file name with path), file name, absolute directory name (with path).
#So the result is /media/test/script/script.sh FP FN DN. Add other arguments as needed eg -f, -r
user_script_param = FN
#Specify the successcodes returned by the user script as a comma separated list. Linux default is 0
user_script_successCodes = 0