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:
|
||||
tableName = row[0]
|
||||
if tableName != "version":
|
||||
query = "DELETE FROM ?"
|
||||
cursor.execute(query, (tableName,))
|
||||
cursor.execute("DELETE FROM %s" % tableName)
|
||||
connection.commit()
|
||||
connection.close()
|
||||
|
||||
|
|
|
@ -1409,8 +1409,8 @@ class Kodidb_Functions():
|
|||
ID = 'idEpisode'
|
||||
elif kodi_type == v.KODI_TYPE_SONG:
|
||||
ID = 'idSong'
|
||||
query = '''UPDATE ? SET userrating = ? WHERE ? = ?'''
|
||||
self.cursor.execute(query, (kodi_type, userrating, ID, kodi_id))
|
||||
query = '''UPDATE %s SET userrating = ? WHERE ? = ?''' % kodi_type
|
||||
self.cursor.execute(query, (userrating, ID, kodi_id))
|
||||
|
||||
def create_entry_uniqueid(self):
|
||||
self.cursor.execute(
|
||||
|
|
Loading…
Reference in a new issue