Fix possible OperationalErrors
This commit is contained in:
parent
f83a304419
commit
7d6310601c
2 changed files with 3 additions and 4 deletions
|
@ -236,8 +236,7 @@ class Artwork():
|
||||||
for row in rows:
|
for row in rows:
|
||||||
tableName = row[0]
|
tableName = row[0]
|
||||||
if tableName != "version":
|
if tableName != "version":
|
||||||
query = "DELETE FROM ?"
|
cursor.execute("DELETE FROM %s" % tableName)
|
||||||
cursor.execute(query, (tableName,))
|
|
||||||
connection.commit()
|
connection.commit()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
|
|
@ -1409,8 +1409,8 @@ class Kodidb_Functions():
|
||||||
ID = 'idEpisode'
|
ID = 'idEpisode'
|
||||||
elif kodi_type == v.KODI_TYPE_SONG:
|
elif kodi_type == v.KODI_TYPE_SONG:
|
||||||
ID = 'idSong'
|
ID = 'idSong'
|
||||||
query = '''UPDATE ? SET userrating = ? WHERE ? = ?'''
|
query = '''UPDATE %s SET userrating = ? WHERE ? = ?''' % kodi_type
|
||||||
self.cursor.execute(query, (kodi_type, userrating, ID, kodi_id))
|
self.cursor.execute(query, (userrating, ID, kodi_id))
|
||||||
|
|
||||||
def create_entry_uniqueid(self):
|
def create_entry_uniqueid(self):
|
||||||
self.cursor.execute(
|
self.cursor.execute(
|
||||||
|
|
Loading…
Reference in a new issue