mirror of https://github.com/morpheus65535/bazarr
Change in order of update to DB to not run an update before updating schema
This commit is contained in:
parent
b5301d3154
commit
a6c067e79f
18
update_db.py
18
update_db.py
|
@ -49,15 +49,6 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
|||
for provider in providers:
|
||||
c.execute('INSERT INTO `table_settings_notifier` (name, enabled) VALUES (?, ?);', (provider,'0'))
|
||||
|
||||
try:
|
||||
c.execute('alter table table_episodes add column "scene_name" TEXT')
|
||||
db.commit()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
from scheduler import execute_now
|
||||
execute_now('update_all_episodes')
|
||||
|
||||
try:
|
||||
c.execute('alter table table_settings_general add column "minimum_score" "text"')
|
||||
except:
|
||||
|
@ -87,5 +78,14 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
|||
# Commit change to db
|
||||
db.commit()
|
||||
|
||||
try:
|
||||
c.execute('alter table table_episodes add column "scene_name" TEXT')
|
||||
db.commit()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
from scheduler import execute_now
|
||||
execute_now('update_all_episodes')
|
||||
|
||||
# Close database connection
|
||||
db.close()
|
||||
|
|
Loading…
Reference in New Issue