add "delete_on" parameter for SickRage. Fixes #814

This commit is contained in:
clinton-hall 2015-08-23 08:17:09 +09:30
commit 22bb2b64b1
3 changed files with 14 additions and 2 deletions

View file

@ -83,6 +83,8 @@
process_method =
# force processing of already processed content when running a manual scan.
force = 0
# tell SickRage to delete all source files after processing.
delete_on = 0
extract = 1
nzbExtractionBy = Downloader
# Set this to minimum required size to consider a media file valid (in MB)

View file

@ -56,8 +56,8 @@ FORK_SICKRAGE = "sickrage"
FORKS[FORK_DEFAULT] = {"dir": None}
FORKS[FORK_FAILED] = {"dirName": None, "failed": None}
FORKS[FORK_FAILED_TORRENT] = {"dir": None, "failed": None, "process_method": None}
FORKS[FORK_SICKRAGE] = {"dir": None, "failed": None, "process_method": None, "force": None}
ALL_FORKS = {"dir": None, "dirName": None, "failed": None, "process_method": None, "force": None}
FORKS[FORK_SICKRAGE] = {"dir": None, "failed": None, "process_method": None, "force": None, "delete_on": None}
ALL_FORKS = {"dir": None, "dirName": None, "failed": None, "process_method": None, "force": None, "delete_on": None}
SICKBEARD_FAILED = [FORK_FAILED, FORK_FAILED_TORRENT, FORK_SICKRAGE]
SICKBEARD_TORRENT = [FORK_FAILED_TORRENT, FORK_SICKRAGE]

View file

@ -104,6 +104,10 @@ class autoProcessTV:
force = int(core.CFG[section][inputCategory]["force"])
except:
force = 0
try:
delete_on = int(core.CFG[section][inputCategory]["delete_on"])
except:
delete_on = 0
try:
extract = int(section[inputCategory]["extract"])
except:
@ -211,6 +215,12 @@ class autoProcessTV:
else:
del fork_params[param]
if param == "delete_on":
if delete_on:
fork_params[param] = delete_on
else:
del fork_params[param]
# delete any unused params so we don't pass them to SB by mistake
[fork_params.pop(k) for k,v in fork_params.items() if v is None]