diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 44f5e3010fcdf61386edb13a7bc89458fdf25600..d005d427cde452af994551b2ade6fe7e6744bae5 100755 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -352,7 +352,7 @@ def initialize(consoleLogging=True): CheckSection(CFG, 'NMJ') CheckSection(CFG, 'Synology') CheckSection(CFG, 'pyTivo') - CheckSection('NMA') + CheckSection(CFG, 'NMA') LOG_DIR = check_setting_str(CFG, 'General', 'log_dir', 'Logs') if not helpers.makeDir(LOG_DIR): diff --git a/sickbeard/config.py b/sickbeard/config.py index 3c24f9fe835081767ed292fb83f28c7e8c2e53e1..2f24d79d7badab34e56ca0c9198d47bc70a174d9 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -247,8 +247,6 @@ def check_setting_str(config, cfg_name, item_name, def_val, log=True): class ConfigMigrator(): - migration_names = {1: 'Custom naming'} - def __init__(self, config_obj): """ Initializes a config migrator that can take the config from the version indicated in the config @@ -260,6 +258,9 @@ class ConfigMigrator(): # check the version of the config self.config_version = check_setting_int(config_obj, 'General', 'config_version', 0) + self.migration_names = {1: 'Custom naming'} + + def migrate_config(self): """ Calls each successive migration until the config is the same version as SB expects diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py index 4a1a9e4e990b250cedc71d19af16b948556870e1..70f6eacf0207efc9ca40e2af0dd24f411ff9c75e 100644 --- a/sickbeard/databases/mainDB.py +++ b/sickbeard/databases/mainDB.py @@ -430,6 +430,7 @@ class AddSizeAndSceneNameFields(FixAirByDateSetting): download_results = self.connection.select("SELECT resource FROM history WHERE provider = -1 AND showid = ? AND season = ? AND episode = ? AND date > ?", [cur_result["showid"], cur_result["season"], cur_result["episode"], cur_result["date"]]) if not download_results: + logger.log(u"Found a snatch in the history for "+cur_result["resource"]+" but couldn't find the associated download, skipping it", logger.DEBUG) continue nzb_name = cur_result["resource"] @@ -443,6 +444,7 @@ class AddSizeAndSceneNameFields(FixAirByDateSetting): ep_results = self.connection.select("SELECT episode_id, status FROM tv_episodes WHERE showid = ? AND season = ? AND episode = ? AND location != ''", [cur_result["showid"], cur_result["season"], cur_result["episode"]]) if not ep_results: + logger.log(u"The episode "+nzb_name+" was found in history but doesn't exist on disk anymore, skipping", logger.DEBUG) continue # get the status/quality of the existing ep and make sure it's what we expect