mirror of https://github.com/evilhero/mylar
Update mylar/PostProcessor.py
This commit is contained in:
parent
6b27c3be8a
commit
5dc6a62385
|
@ -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, filen, folderp, seriesmetadata):
|
def _run_pre_scripts(self, nzb_name, nzb_folder ):
|
||||||
"""
|
"""
|
||||||
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), str(filen), str(folderp), str(seriesmetadata)]
|
script_cmd = shlex.split(currentScriptName) + [str(nzb_name), str(nzb_folder)]
|
||||||
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
|
||||||
|
@ -264,6 +264,7 @@ class PostProcessor(object):
|
||||||
|
|
||||||
if mylar.ENABLE_PRE_SCRIPTS:
|
if mylar.ENABLE_PRE_SCRIPTS:
|
||||||
nzbn = self.nzb_name #original nzb name
|
nzbn = self.nzb_name #original nzb name
|
||||||
|
nzbf = self.nzb_folder #original nzb folder
|
||||||
#name, comicyear, comicid , issueid, issueyear, issue, publisher
|
#name, comicyear, comicid , issueid, issueyear, issue, publisher
|
||||||
#create the dic and send it.
|
#create the dic and send it.
|
||||||
seriesmeta = []
|
seriesmeta = []
|
||||||
|
@ -278,7 +279,7 @@ class PostProcessor(object):
|
||||||
'publisher': publisher
|
'publisher': publisher
|
||||||
})
|
})
|
||||||
seriesmetadata['seriesmeta'] = seriesmeta
|
seriesmetadata['seriesmeta'] = seriesmeta
|
||||||
self._run_pre_scripts(nzbn, self.nzb_folder, seriesmetadata )
|
self._run_pre_scripts(nzbn, nzbf )
|
||||||
|
|
||||||
#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