mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
Making frequency of version update checker (CHECKVERSION) configurable
Conflicts: sickbeard/__init__.py
This commit is contained in:
commit
2f0fa9a4ce
4 changed files with 33 additions and 6 deletions
|
@ -67,7 +67,29 @@
|
||||||
</label>
|
</label>
|
||||||
<label class="nocheck clearfix">
|
<label class="nocheck clearfix">
|
||||||
<span class="component-title"> </span>
|
<span class="component-title"> </span>
|
||||||
<span class="component-desc">Checking for updates runs on startup and every 12 hours.</span>
|
<span class="component-desc">Checking for updates runs on startup and on the interval specified below.</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title">Update Frequency</span>
|
||||||
|
<input type="text" name="update_frequency" id="update_frequency" value="$sickbeard.UPDATE_FREQUENCY" size="5" />
|
||||||
|
</label>
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title"> </span>
|
||||||
|
<span class="component-desc">Time in hours to check for software updates (eg. 12)</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title">Update Frequency</span>
|
||||||
|
<input type="text" name="update_frequency" id="update_frequency" value="$sickbeard.UPDATE_FREQUENCY" size="5" />
|
||||||
|
</label>
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title"> </span>
|
||||||
|
<span class="component-desc">Time in hours to check for software updates (eg. 12)</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -284,6 +306,7 @@
|
||||||
<span class="component-desc">Proxy to use for connecting to providers. Leave empty to not use proxy</b></span>
|
<span class="component-desc">Proxy to use for connecting to providers. Leave empty to not use proxy</b></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div><!-- /component-group4 //-->
|
</div><!-- /component-group4 //-->
|
||||||
|
|
|
@ -168,9 +168,12 @@ ALLOW_HIGH_PRIORITY = None
|
||||||
SEARCH_FREQUENCY = None
|
SEARCH_FREQUENCY = None
|
||||||
BACKLOG_SEARCH_FREQUENCY = 21
|
BACKLOG_SEARCH_FREQUENCY = 21
|
||||||
|
|
||||||
|
UPDATE_FREQUENCY = None
|
||||||
|
|
||||||
MIN_SEARCH_FREQUENCY = 10
|
MIN_SEARCH_FREQUENCY = 10
|
||||||
|
|
||||||
DEFAULT_SEARCH_FREQUENCY = 40
|
DEFAULT_SEARCH_FREQUENCY = 40
|
||||||
|
DEFAULT_UPDATE_FREQUENCY = 12
|
||||||
|
|
||||||
EZRSS = False
|
EZRSS = False
|
||||||
|
|
||||||
|
@ -476,7 +479,7 @@ def initialize(consoleLogging=True):
|
||||||
USE_PUSHALOT, PUSHALOT_NOTIFY_ONSNATCH, PUSHALOT_NOTIFY_ONDOWNLOAD, PUSHALOT_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHALOT_AUTHORIZATIONTOKEN, \
|
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, \
|
USE_PUSHBULLET, PUSHBULLET_NOTIFY_ONSNATCH, PUSHBULLET_NOTIFY_ONDOWNLOAD, PUSHBULLET_NOTIFY_ONSUBTITLEDOWNLOAD, PUSHBULLET_API, PUSHBULLET_DEVICE, \
|
||||||
versionCheckScheduler, VERSION_NOTIFY, AUTO_UPDATE, PROCESS_AUTOMATICALLY, UNPACK, \
|
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, \
|
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, \
|
NAMING_PATTERN, NAMING_MULTI_EP, NAMING_FORCE_FOLDERS, NAMING_ABD_PATTERN, NAMING_CUSTOM_ABD, NAMING_STRIP_YEAR, \
|
||||||
RENAME_EPISODES, properFinderScheduler, PROVIDER_ORDER, autoPostProcesserScheduler, \
|
RENAME_EPISODES, properFinderScheduler, PROVIDER_ORDER, autoPostProcesserScheduler, \
|
||||||
|
@ -973,7 +976,7 @@ def initialize(consoleLogging=True):
|
||||||
|
|
||||||
# initialize newznab providers
|
# initialize newznab providers
|
||||||
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
|
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
|
||||||
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
|
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY or DEFAULT_SEARCH_FREQUENCY),
|
||||||
threadName="SEARCH",
|
threadName="SEARCH",
|
||||||
runImmediately=True)
|
runImmediately=True)
|
||||||
|
|
||||||
|
@ -985,7 +988,7 @@ def initialize(consoleLogging=True):
|
||||||
runImmediately=False)
|
runImmediately=False)
|
||||||
|
|
||||||
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
|
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
|
||||||
cycleTime=datetime.timedelta(hours=12),
|
cycleTime=datetime.timedelta(hours=UPDATE_FREQUENCY or DEFAULT_UPDATE_FREQUENCY),
|
||||||
threadName="CHECKVERSION",
|
threadName="CHECKVERSION",
|
||||||
runImmediately=True)
|
runImmediately=True)
|
||||||
|
|
||||||
|
@ -1296,6 +1299,7 @@ def save_config():
|
||||||
new_config['General']['torrent_method'] = TORRENT_METHOD
|
new_config['General']['torrent_method'] = TORRENT_METHOD
|
||||||
new_config['General']['usenet_retention'] = int(USENET_RETENTION)
|
new_config['General']['usenet_retention'] = int(USENET_RETENTION)
|
||||||
new_config['General']['search_frequency'] = int(SEARCH_FREQUENCY)
|
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']['download_propers'] = int(DOWNLOAD_PROPERS)
|
||||||
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
|
new_config['General']['allow_high_priority'] = int(ALLOW_HIGH_PRIORITY)
|
||||||
new_config['General']['quality_default'] = int(QUALITY_DEFAULT)
|
new_config['General']['quality_default'] = int(QUALITY_DEFAULT)
|
||||||
|
|
|
@ -166,7 +166,6 @@ def change_SEARCH_FREQUENCY(freq):
|
||||||
sickbeard.currentSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.SEARCH_FREQUENCY)
|
sickbeard.currentSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.SEARCH_FREQUENCY)
|
||||||
sickbeard.backlogSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.get_backlog_cycle_time())
|
sickbeard.backlogSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.get_backlog_cycle_time())
|
||||||
|
|
||||||
|
|
||||||
def change_VERSION_NOTIFY(version_notify):
|
def change_VERSION_NOTIFY(version_notify):
|
||||||
oldSetting = sickbeard.VERSION_NOTIFY
|
oldSetting = sickbeard.VERSION_NOTIFY
|
||||||
|
|
||||||
|
|
|
@ -974,7 +974,7 @@ class ConfigGeneral:
|
||||||
|
|
||||||
@cherrypy.expose
|
@cherrypy.expose
|
||||||
def saveGeneral(self, log_dir=None, web_port=None, web_log=None, encryption_version=None, web_ipv6=None,
|
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,
|
web_password=None, version_notify=None, enable_https=None, https_cert=None, https_key=None,
|
||||||
sort_article=None, auto_update=None, proxy_setting=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):
|
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.LOG_DIR is set in config.change_LOG_DIR()
|
||||||
|
|
||||||
sickbeard.UPDATE_SHOWS_ON_START = config.checkbox_to_value(update_shows_on_start)
|
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.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
|
||||||
sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article)
|
sickbeard.SORT_ARTICLE = config.checkbox_to_value(sort_article)
|
||||||
sickbeard.ANON_REDIRECT = anon_redirect
|
sickbeard.ANON_REDIRECT = anon_redirect
|
||||||
|
|
Loading…
Reference in a new issue