diff --git a/gui/slick/interfaces/default/config_general.tmpl b/gui/slick/interfaces/default/config_general.tmpl index 9c195186..45e28a59 100644 --- a/gui/slick/interfaces/default/config_general.tmpl +++ b/gui/slick/interfaces/default/config_general.tmpl @@ -67,7 +67,29 @@ + + +
+ + +
+ +
+ +
@@ -284,6 +306,7 @@ Proxy to use for connecting to providers. Leave empty to not use proxy + diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py index 8cfa9705..c1eab6b1 100644 --- a/sickbeard/__init__.py +++ b/sickbeard/__init__.py @@ -168,9 +168,12 @@ ALLOW_HIGH_PRIORITY = None SEARCH_FREQUENCY = None BACKLOG_SEARCH_FREQUENCY = 21 +UPDATE_FREQUENCY = None + MIN_SEARCH_FREQUENCY = 10 DEFAULT_SEARCH_FREQUENCY = 40 +DEFAULT_UPDATE_FREQUENCY = 12 EZRSS = False @@ -476,7 +479,7 @@ def initialize(consoleLogging=True): USE_PUSHALOT, PUSHALOT_NOTIFY_ONSNATCH, PUSHALOT_NOTIFY_ONDOWNLOAD, PUSHALOT_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHALOT_AUTHORIZATIONTOKEN, \ USE_PUSHBULLET, PUSHBULLET_NOTIFY_ONSNATCH, PUSHBULLET_NOTIFY_ONDOWNLOAD, PUSHBULLET_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHBULLET_API, PUSHBULLET_DEVICE, \ versionCheckScheduler, VERSION_NOTIFY, AUTO_UPDATE, PROCESS_AUTOMATICALLY, UNPACK, \ - KEEP_PROCESSED_DIR, PROCESS_METHOD, TV_DOWNLOAD_DIR, MIN_SEARCH_FREQUENCY, \ + KEEP_PROCESSED_DIR, PROCESS_METHOD, TV_DOWNLOAD_DIR, MIN_SEARCH_FREQUENCY, DEFAULT_UPDATE_FREQUENCY,\ showQueueScheduler, searchQueueScheduler, ROOT_DIRS, CACHE_DIR, ACTUAL_CACHE_DIR, \ NAMING_PATTERN, NAMING_MULTI_EP, NAMING_FORCE_FOLDERS, NAMING_ABD_PATTERN, NAMING_CUSTOM_ABD, NAMING_STRIP_YEAR, \ RENAME_EPISODES, properFinderScheduler, PROVIDER_ORDER, autoPostProcesserScheduler, \ @@ -973,7 +976,7 @@ def initialize(consoleLogging=True): # initialize newznab providers currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(), - cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY), + cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY or DEFAULT_SEARCH_FREQUENCY), threadName="SEARCH", runImmediately=True) @@ -985,7 +988,7 @@ def initialize(consoleLogging=True): runImmediately=False) versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(), - cycleTime=datetime.timedelta(hours=12), + cycleTime=datetime.timedelta(hours=UPDATE_FREQUENCY or DEFAULT_UPDATE_FREQUENCY), threadName="CHECKVERSION", runImmediately=True) @@ -1296,6 +1299,7 @@ def save_config(): new_config['General']['torrent_method'] = TORRENT_METHOD new_config['General']['usenet_retention'] = int(USENET_RETENTION) new_config['General']['search_frequency'] = int(SEARCH_FREQUENCY) + new_config['General']['update_frequency'] = int(UPDATE_FREQUENCY) new_config['General']['download_propers'] = int(DOWNLOAD_PROPERS) new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY) new_config['General']['quality_default'] = int(QUALITY_DEFAULT) diff --git a/sickbeard/config.py b/sickbeard/config.py index 58c554e5..4c6d891c 100644 --- a/sickbeard/config.py +++ b/sickbeard/config.py @@ -166,7 +166,6 @@ 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_VERSION_NOTIFY(version_notify): oldSetting = sickbeard.VERSION_NOTIFY diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 669c9d11..6fe6e71e 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -974,7 +974,7 @@ class ConfigGeneral: @cherrypy.expose def saveGeneral(self, log_dir=None, web_port=None, web_log=None, encryption_version=None, web_ipv6=None, - update_shows_on_start=None, launch_browser=None, web_username=None, use_api=None, api_key=None, + update_shows_on_start=None, update_frequency=None, launch_browser=None, web_username=None, use_api=None, api_key=None, web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=None, sort_article=None, auto_update=None, proxy_setting=None, anon_redirect=None, git_path=None, calendar_unprotected=None, date_preset=None, time_preset=None): @@ -988,6 +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) sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser) sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article) sickbeard.ANON_REDIRECT = anon_redirect