1
0
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:
echel0n 2014-03-20 18:01:26 -07:00
parent 9ba772ba44
commit a0d3a790dc

View File

@ -1848,8 +1848,8 @@ class HomePostProcess:
@cherrypy.expose @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"): 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' # auto-detect dirParam style
if dirName and dir is None: dir = dirName dirParam = dir if dir is not None else dirName if not None else redirect("/home/postprocess/")
if failed == "0": if failed == "0":
failed = False failed = False
@ -1866,15 +1866,12 @@ class HomePostProcess:
else: else:
is_priority = False is_priority = False
if not dir: result = processTV.processDir(dirParam, nzbName, process_method=process_method, force=force, is_priority=is_priority, failed=failed, type=type, indexer=indexer)
redirect("/home/postprocess/") if quiet != None and int(quiet) == 1:
else: return result
result = processTV.processDir(dir, 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
result = result.replace("\n","<br />\n") result = result.replace("\n","<br />\n")
return _genericMessage("Postprocessing results", result) return _genericMessage("Postprocessing results", result)
class NewHomeAddShows: class NewHomeAddShows: