Update mylar/PostProcessor.py

This commit is contained in:
manders2600 2013-01-08 06:01:05 -08:00
parent 5dc6a62385
commit 9e573bf202
1 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ class PostProcessor(object):
# logger.log(message, level)
self.log += message + '\n'
def _run_pre_scripts(self, nzb_name, nzb_folder ):
def _run_pre_scripts(self, nzb_name, nzb_folder, seriesmetadata):
"""
Executes any pre scripts defined in the config.
@ -95,7 +95,7 @@ class PostProcessor(object):
currentScriptName = mylar.PRE_SCRIPTS
self._log("pre script detected...enabling: " + str(currentScriptName), logger.DEBUG)
# generate a safe command line string to execute the script and provide all the parameters
script_cmd = shlex.split(currentScriptName) + [str(nzb_name), str(nzb_folder)]
script_cmd = shlex.split(currentScriptName) + [str(nzb_name), str(nzb_folder), str(seriesmetadata)]
self._log("cmd to be executed: " + str(script_cmd), logger.DEBUG)
# use subprocess to run the command and capture output
@ -279,7 +279,7 @@ class PostProcessor(object):
'publisher': publisher
})
seriesmetadata['seriesmeta'] = seriesmeta
self._run_pre_scripts(nzbn, nzbf )
self._run_pre_scripts(nzbn, nzbf, seriesmetadata )
#rename file and move to new path
#nfilename = series + " " + issueno + " (" + seriesyear + ")"