mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Making frequency of version update checker (CHECKVERSION) configurable
Adds an option in Config > General > Misc called "Update Frequency" Closes #54
This commit is contained in:
parent
b691fa237d
commit
a1d2c3bcb1
@ -67,7 +67,29 @@
|
||||
</label>
|
||||
<label class="nocheck clearfix">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@ -284,6 +306,7 @@
|
||||
<span class="component-desc">Proxy to use for connecting to providers. Leave empty to not use proxy</b></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<input type="submit" class="btn config_submitter" value="Save Changes" />
|
||||
</fieldset>
|
||||
</div><!-- /component-group4 //-->
|
||||
|
@ -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
|
||||
|
||||
@ -463,7 +466,7 @@ def initialize(consoleLogging=True):
|
||||
NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, EZRSS, TVTORRENTS, TVTORRENTS_DIGEST, TVTORRENTS_HASH, TVTORRENTS_OPTIONS, BTN, BTN_API_KEY, BTN_OPTIONS, \
|
||||
THEPIRATEBAY, THEPIRATEBAY_TRUSTED, THEPIRATEBAY_PROXY, THEPIRATEBAY_PROXY_URL, THEPIRATEBAY_BLACKLIST, THEPIRATEBAY_OPTIONS, TORRENTLEECH, TORRENTLEECH_USERNAME, TORRENTLEECH_PASSWORD, TORRENTLEECH_OPTIONS, \
|
||||
IPTORRENTS, IPTORRENTS_USERNAME, IPTORRENTS_PASSWORD, IPTORRENTS_FREELEECH, IPTORRENTS_OPTIONS, KAT, KAT_VERIFIED, KAT_OPTIONS, PUBLICHD, PUBLICHD_OPTIONS, SCC, SCC_USERNAME, SCC_PASSWORD, SCC_OPTIONS, HDTORRENTS, HDTORRENTS_USERNAME, HDTORRENTS_PASSWORD, HDTORRENTS_UID, HDTORRENTS_HASH, HDTORRENTS_OPTIONS, TORRENTDAY, TORRENTDAY_USERNAME, TORRENTDAY_PASSWORD, TORRENTDAY_UID, TORRENTDAY_HASH, TORRENTDAY_FREELEECH, TORRENTDAY_OPTIONS, \
|
||||
HDBITS, HDBITS_USERNAME, HDBITS_PASSKEY, HDBITS_OPTIONS, TORRENT_DIR, USENET_RETENTION, SOCKET_TIMEOUT, SEARCH_FREQUENCY, DEFAULT_SEARCH_FREQUENCY, BACKLOG_SEARCH_FREQUENCY, \
|
||||
HDBITS, HDBITS_USERNAME, HDBITS_PASSKEY, HDBITS_OPTIONS, TORRENT_DIR, USENET_RETENTION, SOCKET_TIMEOUT, SEARCH_FREQUENCY, DEFAULT_SEARCH_FREQUENCY, BACKLOG_SEARCH_FREQUENCY, UPDATE_FREQUENCY, DEFAULT_UPDATE_FREQUENCY, \
|
||||
NEXTGEN, NEXTGEN_USERNAME, NEXTGEN_PASSWORD, NEXTGEN_FREELEECH, NEXTGEN_OPTIONS, \
|
||||
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, \
|
||||
GROWL_NOTIFY_ONSNATCH, GROWL_NOTIFY_ONDOWNLOAD, GROWL_NOTIFY_ONSUBTITLEDOWNLOAD, TWITTER_NOTIFY_ONSNATCH, TWITTER_NOTIFY_ONDOWNLOAD, TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
||||
@ -622,6 +625,8 @@ def initialize(consoleLogging=True):
|
||||
if SEARCH_FREQUENCY < MIN_SEARCH_FREQUENCY:
|
||||
SEARCH_FREQUENCY = MIN_SEARCH_FREQUENCY
|
||||
|
||||
UPDATE_FREQUENCY = check_setting_int(CFG, 'General', 'update_frequency', DEFAULT_UPDATE_FREQUENCY)
|
||||
|
||||
NZB_DIR = check_setting_str(CFG, 'Blackhole', 'nzb_dir', '')
|
||||
TORRENT_DIR = check_setting_str(CFG, 'Blackhole', 'torrent_dir', '')
|
||||
|
||||
@ -977,7 +982,7 @@ def initialize(consoleLogging=True):
|
||||
runImmediately=False)
|
||||
|
||||
versionCheckScheduler = scheduler.Scheduler(versionChecker.CheckVersion(),
|
||||
cycleTime=datetime.timedelta(hours=12),
|
||||
cycleTime=datetime.timedelta(hours=UPDATE_FREQUENCY),
|
||||
threadName="CHECKVERSION",
|
||||
runImmediately=True)
|
||||
|
||||
@ -1288,6 +1293,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)
|
||||
|
@ -160,7 +160,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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user