Merge branch 'development'

This commit is contained in:
morpheus65535 2018-03-09 23:20:40 -05:00
commit 6ea3f81338
3 changed files with 12 additions and 1 deletions

View File

@ -12,5 +12,6 @@ py-pretty
pycountry pycountry
requests requests
subliminal subliminal
tzlocal
urllib3 urllib3
waitress waitress

View File

@ -7,8 +7,13 @@ from check_update import *
from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.schedulers.background import BackgroundScheduler
from datetime import datetime from datetime import datetime
from tzlocal import get_localzone
if str(get_localzone()) == "local":
scheduler = BackgroundScheduler(timezone=utc)
else:
scheduler = BackgroundScheduler() scheduler = BackgroundScheduler()
if automatic == 'True': if automatic == 'True':
scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, misfire_grace_time=15, id='update_bazarr', name='Update bazarr from source on Github') scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, misfire_grace_time=15, id='update_bazarr', name='Update bazarr from source on Github')
else: else:

View File

@ -14,3 +14,8 @@ try:
pip.main(['install', '--user', 'apprise']) pip.main(['install', '--user', 'apprise'])
except SystemExit as e: except SystemExit as e:
pass pass
try:
pip.main(['install', '--user', 'tzlocal'])
except SystemExit as e:
pass