Fix for wonr update order #70

This commit is contained in:
morpheus65535 2018-08-10 20:16:47 -04:00
parent e3c1d98531
commit 76c123daa0

View file

@ -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()