diff --git a/autoProcessMedia.cfg.spec b/autoProcessMedia.cfg.spec index 26c35a8f..e846c16a 100644 --- a/autoProcessMedia.cfg.spec +++ b/autoProcessMedia.cfg.spec @@ -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) diff --git a/core/__init__.py b/core/__init__.py index 7024e7a4..a38eb313 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -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] diff --git a/core/autoProcess/autoProcessTV.py b/core/autoProcess/autoProcessTV.py index b202177e..da4e6972 100644 --- a/core/autoProcess/autoProcessTV.py +++ b/core/autoProcess/autoProcessTV.py @@ -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]