Transform database locked into a settings

Temporary settings, because it slows down the process since it's
auto-committing. Not everyone has database locked crashes. Permanent fix
is being worked on in the database branch.
This commit is contained in:
angelblue05 2016-07-19 02:08:35 -05:00
commit f89d5c96f6
3 changed files with 6 additions and 1 deletions

View file

@ -97,7 +97,10 @@ def kodiSQL(media_type="video"):
else:
dbPath = getKodiVideoDBPath()
connection = sqlite3.connect(dbPath, isolation_level=None, timeout=20)
if settings('dblock') == "true":
connection = sqlite3.connect(dbPath, isolation_level=None, timeout=20)
else:
connection = sqlite3.connect(dbPath, timeout=20)
return connection
def getKodiVideoDBPath():