Merge pull request #1012 from JackDandy/feature/ChangeUsingUpdateShowsHour

Change use value of "Update shows during hour" in General Settings…
This commit is contained in:
JackDandy 2017-11-11 00:07:14 +00:00 committed by GitHub
commit cd8ca7645c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -1,4 +1,4 @@
### 0.13.0 (2016-xx-xx xx:xx:xx UTC)
### 0.13.0 (2017-xx-xx xx:xx:xx UTC)
* Change don't fetch caps for disabled nzb providers
* Change recent search to use centralised title and URL parser for newznab
@ -134,6 +134,7 @@
* Add restriction to allow only same release group for repacks
* Change try all episode names with 'real', 'repack', 'proper'
* Add tip to search settings/media search about improved matching with optional regex library
* Change use value of "Update shows during hour" in General Settings straight after it is saved instead of after restart
[develop changelog]

View file

@ -39,6 +39,7 @@ class Scheduler(threading.Thread):
self.name = threadName
self.silent = silent
self.stop = threading.Event()
self.lock = threading.Lock()
self.force = False
def timeLeft(self):

View file

@ -4809,6 +4809,11 @@ class ConfigGeneral(Config):
sickbeard.LAUNCH_BROWSER = config.checkbox_to_value(launch_browser)
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)
try:
with sickbeard.showUpdateScheduler.lock:
sickbeard.showUpdateScheduler.start_time = datetime.time(hour=sickbeard.SHOW_UPDATE_HOUR)
except (StandardError, Exception) as e:
logger.log('Could not change Show Update Scheduler time: %s' % ex(e), logger.ERROR)
sickbeard.TRASH_REMOVE_SHOW = config.checkbox_to_value(trash_remove_show)
sickbeard.TRASH_ROTATE_LOGS = config.checkbox_to_value(trash_rotate_logs)
if not config.change_LOG_DIR(log_dir, web_log):