mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-07 02:23:38 +00:00
Add setting "Update shows during hour" to General Config/Misc.
This commit is contained in:
parent
33aa238060
commit
f8606cd855
5 changed files with 25 additions and 8 deletions
|
@ -58,6 +58,7 @@
|
||||||
* Change to streamline iCal function and make it handle missing network names
|
* Change to streamline iCal function and make it handle missing network names
|
||||||
* Change when picking a best result to only test items that have a size specifier against the failed history
|
* Change when picking a best result to only test items that have a size specifier against the failed history
|
||||||
* Add anime release groups to add new show options page
|
* Add anime release groups to add new show options page
|
||||||
|
* Add setting "Update shows during hour" to General Config/Misc
|
||||||
|
|
||||||
[develop changelog]
|
[develop changelog]
|
||||||
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
|
* Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed
|
||||||
|
|
|
@ -68,11 +68,21 @@
|
||||||
<span class="component-title">Update shows on startup</span>
|
<span class="component-title">Update shows on startup</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
<input type="checkbox" name="update_shows_on_start" id="update_shows_on_start" #if $sickbeard.UPDATE_SHOWS_ON_START then 'checked="checked"' else ''#/>
|
<input type="checkbox" name="update_shows_on_start" id="update_shows_on_start" #if $sickbeard.UPDATE_SHOWS_ON_START then 'checked="checked"' else ''#/>
|
||||||
<p>with information such as next air dates, show ended, etc. Disable for a faster startup as show info is scheduled to update in the background anyway</p>
|
<p>with show data; episode plot, images, air and end dates, etc. Disable for a quicker startup. Show data is scheduled to update during hour <span class="show_update_hour_value">$sickbeard.SHOW_UPDATE_HOUR</span>.</p>
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="show_update_hour">
|
||||||
|
<span class="component-title">Update shows during hour</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="number" name="show_update_hour" id="show_update_hour" value="$sickbeard.SHOW_UPDATE_HOUR" class="form-control input-sm input75" />
|
||||||
|
<p>(0 ... 23) with show data; episode plot, images, air and end dates, etc.</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<span class="component-title">Send to trash for actions</span>
|
<span class="component-title">Send to trash for actions</span>
|
||||||
<span class="component-desc">
|
<span class="component-desc">
|
||||||
|
|
|
@ -92,6 +92,7 @@ $(document).ready(function(){
|
||||||
$(this).after('<span><img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif"> Saving...</span>');
|
$(this).after('<span><img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif"> Saving...</span>');
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
});
|
});
|
||||||
|
$('.show_update_hour_value').text($('#show_update_hour').val())
|
||||||
},
|
},
|
||||||
success: function(){
|
success: function(){
|
||||||
setTimeout('config_success()', 2000)
|
setTimeout('config_success()', 2000)
|
||||||
|
@ -99,7 +100,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#api_key').click(function(){ $('#api_key').select() });
|
$('#api_key').click(function(){ $('#api_key').select() });
|
||||||
$("#generate_new_apikey").click(function(){
|
$('#generate_new_apikey').click(function(){
|
||||||
$.get(sbRoot + '/config/general/generateKey',
|
$.get(sbRoot + '/config/general/generateKey',
|
||||||
function(data){
|
function(data){
|
||||||
if (data.error != undefined) {
|
if (data.error != undefined) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ from providers import ezrss, btn, newznab, womble, thepiratebay, torrentleech, k
|
||||||
omgwtfnzbs, scc, hdtorrents, torrentday, hdbits, nextgen, speedcd, nyaatorrents, fanzub, torrentbytes, \
|
omgwtfnzbs, scc, hdtorrents, torrentday, hdbits, nextgen, speedcd, nyaatorrents, fanzub, torrentbytes, \
|
||||||
freshontv, bitsoup, tokyotoshokan
|
freshontv, bitsoup, tokyotoshokan
|
||||||
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, check_setting_float, ConfigMigrator, \
|
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, check_setting_float, ConfigMigrator, \
|
||||||
naming_ep_type
|
naming_ep_type, minimax
|
||||||
from sickbeard import searchBacklog, showUpdater, versionChecker, properFinder, autoPostProcesser, \
|
from sickbeard import searchBacklog, showUpdater, versionChecker, properFinder, autoPostProcesser, \
|
||||||
subtitles, traktChecker
|
subtitles, traktChecker
|
||||||
from sickbeard import helpers, db, exceptions, show_queue, search_queue, scheduler, show_name_helpers
|
from sickbeard import helpers, db, exceptions, show_queue, search_queue, scheduler, show_name_helpers
|
||||||
|
@ -91,6 +91,8 @@ traktCheckerScheduler = None
|
||||||
|
|
||||||
showList = None
|
showList = None
|
||||||
loadingShowList = None
|
loadingShowList = None
|
||||||
|
UPDATE_SHOWS_ON_START = False
|
||||||
|
SHOW_UPDATE_HOUR = 3
|
||||||
|
|
||||||
providerList = []
|
providerList = []
|
||||||
newznabProviderList = []
|
newznabProviderList = []
|
||||||
|
@ -144,7 +146,6 @@ LAUNCH_BROWSER = False
|
||||||
CACHE_DIR = None
|
CACHE_DIR = None
|
||||||
ACTUAL_CACHE_DIR = None
|
ACTUAL_CACHE_DIR = None
|
||||||
ROOT_DIRS = None
|
ROOT_DIRS = None
|
||||||
UPDATE_SHOWS_ON_START = False
|
|
||||||
TRASH_REMOVE_SHOW = False
|
TRASH_REMOVE_SHOW = False
|
||||||
TRASH_ROTATE_LOGS = False
|
TRASH_ROTATE_LOGS = False
|
||||||
HOME_SEARCH_FOCUS = True
|
HOME_SEARCH_FOCUS = True
|
||||||
|
@ -468,7 +469,7 @@ def initialize(consoleLogging=True):
|
||||||
USE_TRAKT, TRAKT_USERNAME, TRAKT_PASSWORD, TRAKT_API, TRAKT_REMOVE_WATCHLIST, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktCheckerScheduler, TRAKT_USE_RECOMMENDED, TRAKT_SYNC, TRAKT_DEFAULT_INDEXER, TRAKT_REMOVE_SERIESLIST, \
|
USE_TRAKT, TRAKT_USERNAME, TRAKT_PASSWORD, TRAKT_API, TRAKT_REMOVE_WATCHLIST, TRAKT_USE_WATCHLIST, TRAKT_METHOD_ADD, TRAKT_START_PAUSED, traktCheckerScheduler, TRAKT_USE_RECOMMENDED, TRAKT_SYNC, TRAKT_DEFAULT_INDEXER, TRAKT_REMOVE_SERIESLIST, \
|
||||||
USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, \
|
USE_PLEX, PLEX_NOTIFY_ONSNATCH, PLEX_NOTIFY_ONDOWNLOAD, PLEX_NOTIFY_ONSUBTITLEDOWNLOAD, PLEX_UPDATE_LIBRARY, \
|
||||||
PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, BACKLOG_STARTUP, SKIP_REMOVED_FILES, \
|
PLEX_SERVER_HOST, PLEX_HOST, PLEX_USERNAME, PLEX_PASSWORD, DEFAULT_BACKLOG_FREQUENCY, MIN_BACKLOG_FREQUENCY, BACKLOG_STARTUP, SKIP_REMOVED_FILES, \
|
||||||
showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, UPDATE_SHOWS_ON_START, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, HOME_SEARCH_FOCUS, SORT_ARTICLE, showList, loadingShowList, \
|
showUpdateScheduler, __INITIALIZED__, LAUNCH_BROWSER, TRASH_REMOVE_SHOW, TRASH_ROTATE_LOGS, HOME_SEARCH_FOCUS, SORT_ARTICLE, showList, loadingShowList, UPDATE_SHOWS_ON_START, SHOW_UPDATE_HOUR, \
|
||||||
NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \
|
NEWZNAB_DATA, NZBS, NZBS_UID, NZBS_HASH, INDEXER_DEFAULT, INDEXER_TIMEOUT, USENET_RETENTION, TORRENT_DIR, \
|
||||||
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, RECENTSEARCH_STARTUP, \
|
QUALITY_DEFAULT, FLATTEN_FOLDERS_DEFAULT, SUBTITLES_DEFAULT, STATUS_DEFAULT, RECENTSEARCH_STARTUP, \
|
||||||
GROWL_NOTIFY_ONSNATCH, GROWL_NOTIFY_ONDOWNLOAD, GROWL_NOTIFY_ONSUBTITLEDOWNLOAD, TWITTER_NOTIFY_ONSNATCH, TWITTER_NOTIFY_ONDOWNLOAD, TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
GROWL_NOTIFY_ONSNATCH, GROWL_NOTIFY_ONDOWNLOAD, GROWL_NOTIFY_ONSUBTITLEDOWNLOAD, TWITTER_NOTIFY_ONSNATCH, TWITTER_NOTIFY_ONDOWNLOAD, TWITTER_NOTIFY_ONSUBTITLEDOWNLOAD, \
|
||||||
|
@ -594,11 +595,13 @@ def initialize(consoleLogging=True):
|
||||||
ANON_REDIRECT = check_setting_str(CFG, 'General', 'anon_redirect', 'http://dereferer.org/?')
|
ANON_REDIRECT = check_setting_str(CFG, 'General', 'anon_redirect', 'http://dereferer.org/?')
|
||||||
PROXY_SETTING = check_setting_str(CFG, 'General', 'proxy_setting', '')
|
PROXY_SETTING = check_setting_str(CFG, 'General', 'proxy_setting', '')
|
||||||
PROXY_INDEXERS = bool(check_setting_int(CFG, 'General', 'proxy_indexers', 1))
|
PROXY_INDEXERS = bool(check_setting_int(CFG, 'General', 'proxy_indexers', 1))
|
||||||
# attempt to help prevent users from breaking links by using a bad url
|
# attempt to help prevent users from breaking links by using a bad url
|
||||||
if not ANON_REDIRECT.endswith('?'):
|
if not ANON_REDIRECT.endswith('?'):
|
||||||
ANON_REDIRECT = ''
|
ANON_REDIRECT = ''
|
||||||
|
|
||||||
UPDATE_SHOWS_ON_START = bool(check_setting_int(CFG, 'General', 'update_shows_on_start', 0))
|
UPDATE_SHOWS_ON_START = bool(check_setting_int(CFG, 'General', 'update_shows_on_start', 0))
|
||||||
|
SHOW_UPDATE_HOUR = check_setting_int(CFG, 'General', 'show_update_hour', 3)
|
||||||
|
SHOW_UPDATE_HOUR = minimax(SHOW_UPDATE_HOUR, 3, 0, 23)
|
||||||
TRASH_REMOVE_SHOW = bool(check_setting_int(CFG, 'General', 'trash_remove_show', 0))
|
TRASH_REMOVE_SHOW = bool(check_setting_int(CFG, 'General', 'trash_remove_show', 0))
|
||||||
TRASH_ROTATE_LOGS = bool(check_setting_int(CFG, 'General', 'trash_rotate_logs', 0))
|
TRASH_ROTATE_LOGS = bool(check_setting_int(CFG, 'General', 'trash_rotate_logs', 0))
|
||||||
|
|
||||||
|
@ -1101,7 +1104,7 @@ def initialize(consoleLogging=True):
|
||||||
showUpdateScheduler = scheduler.Scheduler(showUpdater.ShowUpdater(),
|
showUpdateScheduler = scheduler.Scheduler(showUpdater.ShowUpdater(),
|
||||||
cycleTime=datetime.timedelta(hours=1),
|
cycleTime=datetime.timedelta(hours=1),
|
||||||
threadName="SHOWUPDATER",
|
threadName="SHOWUPDATER",
|
||||||
start_time=datetime.time(hour=3)) # 3 AM
|
start_time=datetime.time(hour=SHOW_UPDATE_HOUR)) # 3 AM
|
||||||
|
|
||||||
# searchers
|
# searchers
|
||||||
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
|
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
|
||||||
|
@ -1414,6 +1417,7 @@ def save_config():
|
||||||
new_config['General']['naming_anime'] = int(NAMING_ANIME)
|
new_config['General']['naming_anime'] = int(NAMING_ANIME)
|
||||||
new_config['General']['launch_browser'] = int(LAUNCH_BROWSER)
|
new_config['General']['launch_browser'] = int(LAUNCH_BROWSER)
|
||||||
new_config['General']['update_shows_on_start'] = int(UPDATE_SHOWS_ON_START)
|
new_config['General']['update_shows_on_start'] = int(UPDATE_SHOWS_ON_START)
|
||||||
|
new_config['General']['show_update_hour'] = int(SHOW_UPDATE_HOUR)
|
||||||
new_config['General']['trash_remove_show'] = int(TRASH_REMOVE_SHOW)
|
new_config['General']['trash_remove_show'] = int(TRASH_REMOVE_SHOW)
|
||||||
new_config['General']['trash_rotate_logs'] = int(TRASH_ROTATE_LOGS)
|
new_config['General']['trash_rotate_logs'] = int(TRASH_ROTATE_LOGS)
|
||||||
new_config['General']['home_search_focus'] = int(HOME_SEARCH_FOCUS)
|
new_config['General']['home_search_focus'] = int(HOME_SEARCH_FOCUS)
|
||||||
|
|
|
@ -1509,7 +1509,7 @@ class ConfigGeneral(MainHandler):
|
||||||
|
|
||||||
|
|
||||||
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, trash_remove_show=None, trash_rotate_logs=None, update_frequency=None, launch_browser=None, web_username=None,
|
update_shows_on_start=None, show_update_hour=None, trash_remove_show=None, trash_rotate_logs=None, update_frequency=None, launch_browser=None, web_username=None,
|
||||||
use_api=None, api_key=None, indexer_default=None, timezone_display=None, cpu_preset=None,
|
use_api=None, api_key=None, indexer_default=None, timezone_display=None, cpu_preset=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,
|
||||||
handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None,
|
handle_reverse_proxy=None, home_search_focus=None, sort_article=None, auto_update=None, notify_on_update=None,
|
||||||
|
@ -1527,6 +1527,7 @@ class ConfigGeneral(MainHandler):
|
||||||
# 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.SHOW_UPDATE_HOUR = config.minimax(show_update_hour, 3, 0, 23)
|
||||||
sickbeard.TRASH_REMOVE_SHOW = config.checkbox_to_value(trash_remove_show)
|
sickbeard.TRASH_REMOVE_SHOW = config.checkbox_to_value(trash_remove_show)
|
||||||
sickbeard.TRASH_ROTATE_LOGS = config.checkbox_to_value(trash_rotate_logs)
|
sickbeard.TRASH_ROTATE_LOGS = config.checkbox_to_value(trash_rotate_logs)
|
||||||
config.change_UPDATE_FREQUENCY(update_frequency)
|
config.change_UPDATE_FREQUENCY(update_frequency)
|
||||||
|
|
Loading…
Reference in a new issue