Attempt at fixing database locked

Hopefully close before cachetexture will fix the issue.
This commit is contained in:
angelblue05 2015-06-23 20:14:38 -05:00
parent 5f356b9147
commit b6f70fc5bf

View file

@ -80,11 +80,13 @@ class TextureCache():
cursor.execute("SELECT cachedurl FROM texture WHERE url = ?", (url,)) cursor.execute("SELECT cachedurl FROM texture WHERE url = ?", (url,))
result = cursor.fetchone() result = cursor.fetchone()
if result: if result:
cursor.execute("DELETE FROM texture WHERE url = ?", (url,)) result = result[0]
cursor.execute("DELETE FROM texture WHERE cachedurl = ?", (result,))
connection.commit() connection.commit()
else:
self.CacheTexture(url)
cursor.close() cursor.close()
else:
cursor.close()
self.CacheTexture(url)
def setKodiWebServerDetails(self): def setKodiWebServerDetails(self):