mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
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:
parent
35f70c7924
commit
864af297c6
3 changed files with 10 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue