From b6f70fc5bf660c0ce758bf87665dde2ce9a4b51e Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 23 Jun 2015 20:14:38 -0500 Subject: [PATCH] Attempt at fixing database locked Hopefully close before cachetexture will fix the issue. --- resources/lib/TextureCache.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/lib/TextureCache.py b/resources/lib/TextureCache.py index df731dc5..09d0e9a4 100644 --- a/resources/lib/TextureCache.py +++ b/resources/lib/TextureCache.py @@ -80,11 +80,13 @@ class TextureCache(): cursor.execute("SELECT cachedurl FROM texture WHERE url = ?", (url,)) result = cursor.fetchone() if result: - cursor.execute("DELETE FROM texture WHERE url = ?", (url,)) + result = result[0] + cursor.execute("DELETE FROM texture WHERE cachedurl = ?", (result,)) connection.commit() + cursor.close() else: + cursor.close() self.CacheTexture(url) - cursor.close() def setKodiWebServerDetails(self):