mirror of https://github.com/morpheus65535/bazarr
Fix for wonr update order #70
This commit is contained in:
parent
e3c1d98531
commit
76c123daa0
16
update_db.py
16
update_db.py
|
@ -195,6 +195,13 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
|||
else:
|
||||
c.execute('INSERT INTO `table_settings_auth` (enabled, username, password) VALUES ("False", "", "")')
|
||||
|
||||
try:
|
||||
c.execute('alter table table_settings_general add column "only_monitored" "text"')
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
c.execute('UPDATE table_settings_general SET only_monitored="False"')
|
||||
|
||||
# Commit change to db
|
||||
db.commit()
|
||||
|
||||
|
@ -213,15 +220,6 @@ if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
|||
execute_now('update_movies')
|
||||
|
||||
|
||||
|
||||
try:
|
||||
c.execute('alter table table_settings_general add column "only_monitored" "text"')
|
||||
db.commit()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
c.execute('UPDATE table_settings_general SET only_monitored="False"')
|
||||
|
||||
try:
|
||||
c.execute('alter table table_episodes add column "monitored" TEXT')
|
||||
db.commit()
|
||||
|
|
Loading…
Reference in New Issue