From 9e573bf202afab521804a9abe00041b658e6905e Mon Sep 17 00:00:00 2001 From: manders2600 Date: Tue, 8 Jan 2013 06:01:05 -0800 Subject: [PATCH] Update mylar/PostProcessor.py --- mylar/PostProcessor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mylar/PostProcessor.py b/mylar/PostProcessor.py index a3cde425..484426a6 100755 --- a/mylar/PostProcessor.py +++ b/mylar/PostProcessor.py @@ -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 + ")"