Fix music artist syncing for Kodi 19

This commit is contained in:
Matt 2021-01-23 16:52:48 -05:00
parent 75590d3a1d
commit 0aa2e71320
2 changed files with 12 additions and 2 deletions

View file

@ -88,7 +88,12 @@ class Music(Kodi):
self.cursor.execute(QU.update_artist_name, args)
def update(self, *args):
self.cursor.execute(QU.update_artist, args)
if self.version_id < 74:
self.cursor.execute(QU.update_artist74, args)
else:
# No field for backdrops in Kodi 19, so we need to omit that here
args = args[:3] + args[4:]
self.cursor.execute(QU.update_artist82, args)
def link(self, *args):
self.cursor.execute(QU.update_link, args)

View file

@ -154,11 +154,16 @@ SET strArtist = ?
WHERE idArtist = ?
"""
update_artist_name_obj = ["{Name}", "{ArtistId}"]
update_artist = """
update_artist74 = """
UPDATE artist
SET strGenres = ?, strBiography = ?, strImage = ?, strFanart = ?, lastScraped = ?
WHERE idArtist = ?
"""
update_artist82 = """
UPDATE artist
SET strGenres = ?, strBiography = ?, strImage = ?, lastScraped = ?
WHERE idArtist = ?
"""
update_link = """
INSERT OR REPLACE INTO album_artist(idArtist, idAlbum, strArtist)
VALUES (?, ?, ?)