Fixes interval setting for auto updates and check version, will set the interval in realtime and take effect right away.

This commit is contained in:
echel0n 2014-04-27 08:02:34 -07:00
parent 35f70c7924
commit 864af297c6
3 changed files with 10 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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