diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 574070d8..10fabebf 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -166,9 +166,8 @@ DOWNLOAD_PROPERS = None ALLOW_HIGH_PRIORITY = None SEARCH_FREQUENCY = None -BACKLOG_SEARCH_FREQUENCY = 21 - UPDATE_FREQUENCY = None +BACKLOG_SEARCH_FREQUENCY = 21 MIN_SEARCH_FREQUENCY = 10 MIN_UPDATE_FREQUENCY = 1 diff --git a/sickbeard/config.py b/sickbeard/config.py index 4c6d891c..c778f030 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -166,6 +166,14 @@ def change_SEARCH_FREQUENCY(freq): sickbeard.currentSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.SEARCH_FREQUENCY) sickbeard.backlogSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.get_backlog_cycle_time()) +def change_UPDATE_FREQUENCY(freq): + sickbeard.UPDATE_FREQUENCY = to_int(freq, default=sickbeard.DEFAULT_UPDATE_FREQUENCY) + + if sickbeard.UPDATE_FREQUENCY < sickbeard.MIN_UPDATE_FREQUENCY: + sickbeard.UPDATE_FREQUENCY = sickbeard.MIN_SEARCH_FREQUENCY + + sickbeard.versionCheckScheduler.cycleTime = datetime.timedelta(hours=sickbeard.UPDATE_FREQUENCY) + def change_VERSION_NOTIFY(version_notify): oldSetting = sickbeard.VERSION_NOTIFY diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index dcaa146c..bed3aaa9 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -988,7 +988,7 @@ class ConfigGeneral: # sickbeard.LOG_DIR is set in config.change_LOG_DIR() sickbeard.UPDATE_SHOWS_ON_START = config.checkbox_to_value(update_shows_on_start) - sickbeard.UPDATE_FREQUENCY = config.to_int(update_frequency) + config.change_UPDATE_FREQUENCY(update_frequency) sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser) sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article) sickbeard.ANON_REDIRECT = anon_redirect