Fix OperationalError: no such column
This commit is contained in:
parent
5ad5bc1681
commit
14c135a634
1 changed files with 4 additions and 1 deletions
|
@ -473,10 +473,13 @@ class KodiMusicDB(common.KodiDBBase):
|
||||||
Updates userrating for songs and albums
|
Updates userrating for songs and albums
|
||||||
"""
|
"""
|
||||||
if kodi_type == v.KODI_TYPE_SONG:
|
if kodi_type == v.KODI_TYPE_SONG:
|
||||||
|
column = 'userrating'
|
||||||
identifier = 'idSong'
|
identifier = 'idSong'
|
||||||
elif kodi_type == v.KODI_TYPE_ALBUM:
|
elif kodi_type == v.KODI_TYPE_ALBUM:
|
||||||
|
column = 'iUserrating'
|
||||||
identifier = 'idAlbum'
|
identifier = 'idAlbum'
|
||||||
self.cursor.execute('''UPDATE %s SET userrating = ? WHERE ? = ?''' % kodi_type,
|
self.cursor.execute('''UPDATE %s SET %s = ? WHERE ? = ?'''
|
||||||
|
% (kodi_type, column),
|
||||||
(userrating, identifier, kodi_id))
|
(userrating, identifier, kodi_id))
|
||||||
|
|
||||||
def remove_albuminfosong(self, kodi_id):
|
def remove_albuminfosong(self, kodi_id):
|
||||||
|
|
Loading…
Reference in a new issue