mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Added option to set ShowUpdate time
- Changed hardcoded value from 3 to SHOWUPDATE_HOUR - Added field in Config General to set SHOWUPDATE_HOUR - Default value is still 3 (am), added check if value over 23 or under 0 set to 0 (12am).
This commit is contained in:
parent
c62d8f2c79
commit
6b6d270056
@ -63,6 +63,16 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field-pair">
|
||||||
|
<label for="showupdate_hour">
|
||||||
|
<span class="component-title">When to update shows</span>
|
||||||
|
<span class="component-desc">
|
||||||
|
<input type="text" name="showupdate_hour" id="showupdate_hour" value="$sickbeard.SHOWUPDATE_HOUR" class="form-control input-sm input75" />
|
||||||
|
<p>with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc. Anything over 23 or under 0 will be set to 0 (12am)</p>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="field-pair">
|
<div class="field-pair">
|
||||||
<label for="update_shows_on_start">
|
<label for="update_shows_on_start">
|
||||||
<span class="component-title">Update shows on startup</span>
|
<span class="component-title">Update shows on startup</span>
|
||||||
|
@ -220,6 +220,7 @@ UPDATE_FREQUENCY = None
|
|||||||
DAILYSEARCH_STARTUP = False
|
DAILYSEARCH_STARTUP = False
|
||||||
BACKLOG_FREQUENCY = None
|
BACKLOG_FREQUENCY = None
|
||||||
BACKLOG_STARTUP = False
|
BACKLOG_STARTUP = False
|
||||||
|
SHOWUPDATE_HOUR = 3
|
||||||
|
|
||||||
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
|
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
|
||||||
DEFAULT_DAILYSEARCH_FREQUENCY = 40
|
DEFAULT_DAILYSEARCH_FREQUENCY = 40
|
||||||
@ -536,7 +537,7 @@ def initialize(consoleLogging=True):
|
|||||||
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
METADATA_WDTV, METADATA_TIVO, METADATA_MEDE8ER, IGNORE_WORDS, REQUIRE_WORDS, CALENDAR_UNPROTECTED, CREATE_MISSING_SHOW_DIRS, \
|
||||||
ADD_SHOWS_WO_DIR, USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, subtitlesFinderScheduler, \
|
ADD_SHOWS_WO_DIR, USE_SUBTITLES, SUBTITLES_LANGUAGES, SUBTITLES_DIR, SUBTITLES_SERVICES_LIST, SUBTITLES_SERVICES_ENABLED, SUBTITLES_HISTORY, SUBTITLES_FINDER_FREQUENCY, SUBTITLES_MULTI, subtitlesFinderScheduler, \
|
||||||
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, TMDB_API_KEY, DEBUG, PROXY_SETTING, PROXY_INDEXERS, \
|
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, TMDB_API_KEY, DEBUG, PROXY_SETTING, PROXY_INDEXERS, \
|
||||||
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
AUTOPOSTPROCESSER_FREQUENCY, SHOWUPDATE_HOUR, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
|
||||||
ANIME_DEFAULT, NAMING_ANIME, ANIMESUPPORT, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
|
ANIME_DEFAULT, NAMING_ANIME, ANIMESUPPORT, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
|
||||||
ANIME_SPLIT_HOME, SCENE_DEFAULT, PLAY_VIDEOS, DOWNLOAD_URL, BACKLOG_DAYS, GIT_ORG, GIT_REPO, GIT_USERNAME, GIT_PASSWORD, \
|
ANIME_SPLIT_HOME, SCENE_DEFAULT, PLAY_VIDEOS, DOWNLOAD_URL, BACKLOG_DAYS, GIT_ORG, GIT_REPO, GIT_USERNAME, GIT_PASSWORD, \
|
||||||
GIT_AUTOISSUES, gh
|
GIT_AUTOISSUES, gh
|
||||||
@ -758,7 +759,11 @@ def initialize(consoleLogging=True):
|
|||||||
UPDATE_FREQUENCY = check_setting_int(CFG, 'General', 'update_frequency', DEFAULT_UPDATE_FREQUENCY)
|
UPDATE_FREQUENCY = check_setting_int(CFG, 'General', 'update_frequency', DEFAULT_UPDATE_FREQUENCY)
|
||||||
if UPDATE_FREQUENCY < MIN_UPDATE_FREQUENCY:
|
if UPDATE_FREQUENCY < MIN_UPDATE_FREQUENCY:
|
||||||
UPDATE_FREQUENCY = MIN_UPDATE_FREQUENCY
|
UPDATE_FREQUENCY = MIN_UPDATE_FREQUENCY
|
||||||
|
|
||||||
|
SHOWUPDATE_HOUR = check_setting_int(CFG, 'General', 'showupdate_hour', 3)
|
||||||
|
if SHOWUPDATE_HOUR > 23: SHOWUPDATE_HOUR = 0;
|
||||||
|
elif SHOWUPDATE_HOUR < 0: SHOWUPDATE_HOUR = 0;
|
||||||
|
|
||||||
BACKLOG_DAYS = check_setting_int(CFG, 'General', 'backlog_days', 7)
|
BACKLOG_DAYS = check_setting_int(CFG, 'General', 'backlog_days', 7)
|
||||||
|
|
||||||
NZB_DIR = check_setting_str(CFG, 'Blackhole', 'nzb_dir', '')
|
NZB_DIR = check_setting_str(CFG, 'Blackhole', 'nzb_dir', '')
|
||||||
@ -1186,7 +1191,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=SHOWUPDATE_HOUR)) # 3 AM
|
||||||
|
|
||||||
# searchers
|
# searchers
|
||||||
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
|
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
|
||||||
@ -1477,6 +1482,7 @@ def save_config():
|
|||||||
new_config['General']['dailysearch_frequency'] = int(DAILYSEARCH_FREQUENCY)
|
new_config['General']['dailysearch_frequency'] = int(DAILYSEARCH_FREQUENCY)
|
||||||
new_config['General']['backlog_frequency'] = int(BACKLOG_FREQUENCY)
|
new_config['General']['backlog_frequency'] = int(BACKLOG_FREQUENCY)
|
||||||
new_config['General']['update_frequency'] = int(UPDATE_FREQUENCY)
|
new_config['General']['update_frequency'] = int(UPDATE_FREQUENCY)
|
||||||
|
new_config['General']['showupdate_hour'] = int(SHOWUPDATE_HOUR)
|
||||||
new_config['General']['download_propers'] = int(DOWNLOAD_PROPERS)
|
new_config['General']['download_propers'] = int(DOWNLOAD_PROPERS)
|
||||||
new_config['General']['randomize_providers'] = int(RANDOMIZE_PROVIDERS)
|
new_config['General']['randomize_providers'] = int(RANDOMIZE_PROVIDERS)
|
||||||
new_config['General']['check_propers_interval'] = CHECK_PROPERS_INTERVAL
|
new_config['General']['check_propers_interval'] = CHECK_PROPERS_INTERVAL
|
||||||
|
@ -3478,7 +3478,7 @@ class ConfigGeneral(Config):
|
|||||||
|
|
||||||
def saveGeneral(self, log_dir=None, log_nr = 5, log_size = 1048576, web_port=None, web_log=None, encryption_version=None, web_ipv6=None,
|
def saveGeneral(self, log_dir=None, log_nr = 5, log_size = 1048576, 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,
|
update_shows_on_start=None, trash_remove_show=None, trash_rotate_logs=None, update_frequency=None,
|
||||||
launch_browser=None, web_username=None,
|
launch_browser=None, showupdate_hour=3, web_username=None,
|
||||||
api_key=None, indexer_default=None, timezone_display=None, cpu_preset=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, sort_article=None, auto_update=None, notify_on_update=None,
|
handle_reverse_proxy=None, sort_article=None, auto_update=None, notify_on_update=None,
|
||||||
@ -3494,6 +3494,7 @@ class ConfigGeneral(Config):
|
|||||||
sickbeard.PLAY_VIDEOS = config.checkbox_to_value(play_videos)
|
sickbeard.PLAY_VIDEOS = config.checkbox_to_value(play_videos)
|
||||||
sickbeard.DOWNLOAD_URL = download_url
|
sickbeard.DOWNLOAD_URL = download_url
|
||||||
sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
|
sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
|
||||||
|
sickbeard.SHOWUPDATE_HOUR = config.to_int(showupdate_hour)
|
||||||
config.change_VERSION_NOTIFY(config.checkbox_to_value(version_notify))
|
config.change_VERSION_NOTIFY(config.checkbox_to_value(version_notify))
|
||||||
sickbeard.AUTO_UPDATE = config.checkbox_to_value(auto_update)
|
sickbeard.AUTO_UPDATE = config.checkbox_to_value(auto_update)
|
||||||
sickbeard.NOTIFY_ON_UPDATE = config.checkbox_to_value(notify_on_update)
|
sickbeard.NOTIFY_ON_UPDATE = config.checkbox_to_value(notify_on_update)
|
||||||
|
Loading…
Reference in New Issue
Block a user