mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 14:55:07 -05:00
Added auto-detection of directory paramater for external post-processing calls for 3rd-party utils such as nzbToMedia where you can specify what fork you are using to setup what paramaters are required to be used, this takes the headache out of it
This commit is contained in:
parent
9ba772ba44
commit
a0d3a790dc
@ -1848,8 +1848,8 @@ class HomePostProcess:
|
||||
@cherrypy.expose
|
||||
def processEpisode(self, dir=None, dirName=None, nzbName=None, jobName=None, quiet=None, process_method=None, force=None, is_priority=None, failed="0", type="auto", indexer="auto"):
|
||||
|
||||
# backwards compatibility for original param 'dirName' that has been renamed to 'dir'
|
||||
if dirName and dir is None: dir = dirName
|
||||
# auto-detect dirParam style
|
||||
dirParam = dir if dir is not None else dirName if not None else redirect("/home/postprocess/")
|
||||
|
||||
if failed == "0":
|
||||
failed = False
|
||||
@ -1866,10 +1866,7 @@ class HomePostProcess:
|
||||
else:
|
||||
is_priority = False
|
||||
|
||||
if not dir:
|
||||
redirect("/home/postprocess/")
|
||||
else:
|
||||
result = processTV.processDir(dir, nzbName, process_method=process_method, force=force, is_priority=is_priority, failed=failed, type=type, indexer=indexer)
|
||||
result = processTV.processDir(dirParam, nzbName, process_method=process_method, force=force, is_priority=is_priority, failed=failed, type=type, indexer=indexer)
|
||||
if quiet != None and int(quiet) == 1:
|
||||
return result
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user