mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 09:02:44 +08:00
Fallback to UTC if no timezone information is available #49
This commit is contained in:
parent
73676b3226
commit
e788570726
3 changed files with 12 additions and 1 deletions
|
@ -12,5 +12,6 @@ py-pretty
|
|||
pycountry
|
||||
requests
|
||||
subliminal
|
||||
tzlocal
|
||||
urllib3
|
||||
waitress
|
|
@ -7,8 +7,13 @@ from check_update import *
|
|||
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
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':
|
||||
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:
|
||||
|
|
|
@ -14,3 +14,8 @@ try:
|
|||
pip.main(['install', '--user', 'apprise'])
|
||||
except SystemExit as e:
|
||||
pass
|
||||
|
||||
try:
|
||||
pip.main(['install', '--user', 'tzlocal'])
|
||||
except SystemExit as e:
|
||||
pass
|
Loading…
Reference in a new issue