mirror of https://github.com/evilhero/mylar
Update mylar/PostProcessor.py
This commit is contained in:
parent
5dc6a62385
commit
9e573bf202
|
@ -83,7 +83,7 @@ class PostProcessor(object):
|
||||||
# logger.log(message, level)
|
# logger.log(message, level)
|
||||||
self.log += message + '\n'
|
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.
|
Executes any pre scripts defined in the config.
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ class PostProcessor(object):
|
||||||
currentScriptName = mylar.PRE_SCRIPTS
|
currentScriptName = mylar.PRE_SCRIPTS
|
||||||
self._log("pre script detected...enabling: " + str(currentScriptName), logger.DEBUG)
|
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
|
# 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)
|
self._log("cmd to be executed: " + str(script_cmd), logger.DEBUG)
|
||||||
|
|
||||||
# use subprocess to run the command and capture output
|
# use subprocess to run the command and capture output
|
||||||
|
@ -279,7 +279,7 @@ class PostProcessor(object):
|
||||||
'publisher': publisher
|
'publisher': publisher
|
||||||
})
|
})
|
||||||
seriesmetadata['seriesmeta'] = seriesmeta
|
seriesmetadata['seriesmeta'] = seriesmeta
|
||||||
self._run_pre_scripts(nzbn, nzbf )
|
self._run_pre_scripts(nzbn, nzbf, seriesmetadata )
|
||||||
|
|
||||||
#rename file and move to new path
|
#rename file and move to new path
|
||||||
#nfilename = series + " " + issueno + " (" + seriesyear + ")"
|
#nfilename = series + " " + issueno + " (" + seriesyear + ")"
|
||||||
|
|
Loading…
Reference in New Issue