1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 23:05:11 -05:00

Merge pull request #1286 from TagForce/showupdate

Added option to set ShowUpdate time
This commit is contained in:
Alexandre Beloin 2015-02-16 08:35:39 -05:00
commit 91d847e630
3 changed files with 21 additions and 4 deletions

View File

@ -63,6 +63,16 @@
</label>
</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">
<label for="update_shows_on_start">
<span class="component-title">Update shows on startup</span>

View File

@ -221,6 +221,7 @@ UPDATE_FREQUENCY = None
DAILYSEARCH_STARTUP = False
BACKLOG_FREQUENCY = None
BACKLOG_STARTUP = False
SHOWUPDATE_HOUR = 3
DEFAULT_AUTOPOSTPROCESSER_FREQUENCY = 10
DEFAULT_DAILYSEARCH_FREQUENCY = 40
@ -539,7 +540,7 @@ def initialize(consoleLogging=True):
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, \
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_SPLIT_HOME, SCENE_DEFAULT, PLAY_VIDEOS, DOWNLOAD_URL, BACKLOG_DAYS, GIT_ORG, GIT_REPO, GIT_USERNAME, GIT_PASSWORD, \
GIT_AUTOISSUES, gh
@ -764,7 +765,11 @@ def initialize(consoleLogging=True):
UPDATE_FREQUENCY = check_setting_int(CFG, 'General', 'update_frequency', DEFAULT_UPDATE_FREQUENCY)
if 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)
NZB_DIR = check_setting_str(CFG, 'Blackhole', 'nzb_dir', '')
@ -1194,7 +1199,7 @@ def initialize(consoleLogging=True):
showUpdateScheduler = scheduler.Scheduler(showUpdater.ShowUpdater(),
cycleTime=datetime.timedelta(hours=1),
threadName="SHOWUPDATER",
start_time=datetime.time(hour=3)) # 3 AM
start_time=datetime.time(hour=SHOWUPDATE_HOUR)) # 3 AM
# searchers
searchQueueScheduler = scheduler.Scheduler(search_queue.SearchQueue(),
@ -1486,6 +1491,7 @@ def save_config():
new_config['General']['dailysearch_frequency'] = int(DAILYSEARCH_FREQUENCY)
new_config['General']['backlog_frequency'] = int(BACKLOG_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']['randomize_providers'] = int(RANDOMIZE_PROVIDERS)
new_config['General']['check_propers_interval'] = CHECK_PROPERS_INTERVAL

View File

@ -3480,7 +3480,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,
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,
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,
@ -3496,6 +3496,7 @@ class ConfigGeneral(Config):
sickbeard.PLAY_VIDEOS = config.checkbox_to_value(play_videos)
sickbeard.DOWNLOAD_URL = download_url
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))
sickbeard.AUTO_UPDATE = config.checkbox_to_value(auto_update)
sickbeard.NOTIFY_ON_UPDATE = config.checkbox_to_value(notify_on_update)