diff --git a/autoProcess/autoProcessTV.py b/autoProcess/autoProcessTV.py index 2132fa8a..b7a2d4db 100644 --- a/autoProcess/autoProcessTV.py +++ b/autoProcess/autoProcessTV.py @@ -6,6 +6,7 @@ import logging import shutil import time import socket +import copy import Transcoder from nzbToMediaEnv import * @@ -153,13 +154,15 @@ def processEpisode(dirName, nzbName=None, failed=False, clientAgent=None, inputC params['quiet'] = 1 - if hasattr(params, "failed"): - params['failed'] = failed + for param in copy.copy(params): + if param is "failed": + params["failed"] = failed - if hasattr(params, "dirName"): - params['dirName'] = dirName - else: - params['dir'] = dirName + if param is "dirName": + params["dirName"] = dirName + + if param is "dir": + params["dir"] = dirName if nzbName != None: params['nzbName'] = nzbName diff --git a/autoProcess/migratecfg.py b/autoProcess/migratecfg.py index ff639fc6..0042a2cc 100644 --- a/autoProcess/migratecfg.py +++ b/autoProcess/migratecfg.py @@ -60,6 +60,9 @@ def migrate(): option = "sbCategory" if option == "failed_fork": # change this old format option = "fork" + if value not in ["default", "failed", "failed-torrent", "auto"]: + value = "auto" + if option == "fork" and value not in ["default", "failed", "failed-torrent", "auto"]: value = "auto" if option == "fork" and value in ["TPB", "TPB-failed", "Pistachitos"]: # Merge all these to "auto" value = "auto"