Skip to content

Commit

Permalink
Add PP missing parameter 'delete_on' to api
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandog committed Jun 7, 2016
1 parent a1ebf2b commit ea41397
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sickbeard/server/api/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ class CMD_PostProcess(ApiCall):
"return_data": {"desc": "Returns the result of the post-process"},
"process_method": {"desc": "How should valid post-processed files be handled"},
"is_priority": {"desc": "Replace the file even if it exists in a higher quality"},
"delete_on": {"desc": "Delete files and folders"},
"failed": {"desc": "Mark download as failed"},
"type": {"desc": "The type of post-process being requested"},
}
Expand All @@ -1294,6 +1295,7 @@ def __init__(self, args, kwargs):
self.process_method, args = self.check_params(args, kwargs, "process_method", False, False, "string",
["copy", "symlink", "hardlink", "move"])
self.is_priority, args = self.check_params(args, kwargs, "is_priority", False, False, "bool", [])
self.delete_on, args = self.check_params(args, kwargs, "delete_on", False, False, "bool", [])
self.failed, args = self.check_params(args, kwargs, "failed", False, False, "bool", [])
self.type, args = self.check_params(args, kwargs, "type", "auto", None, "string", ["auto", "manual"])
# super, missing, help
Expand All @@ -1311,7 +1313,8 @@ def run(self):
self.type = "manual"

data = processTV.processDir(self.path, process_method=self.process_method, force=self.force_replace,
is_priority=self.is_priority, failed=self.failed, proc_type=self.type)
is_priority=self.is_priority, delete_on=self.delete_on, failed=self.failed,
proc_type=self.type)

if not self.return_data:
data = ""
Expand Down

0 comments on commit ea41397

Please sign in to comment.