Fix first artist [missing tag] (Reset your DB!)

- Thanks @angelblue05
- Fixes #308
This commit is contained in:
tomkat83 2017-08-08 20:44:36 +02:00
parent f9037dcbd8
commit 83b18faac1

View file

@ -1280,7 +1280,14 @@ class Kodidb_Functions():
try: try:
artistid = self.cursor.fetchone()[0] artistid = self.cursor.fetchone()[0]
except TypeError: except TypeError:
self.cursor.execute("select coalesce(max(idArtist),0) from artist") # Krypton has a dummy first entry idArtist: 1 strArtist:
# [Missing Tag] strMusicBrainzArtistID: Artist Tag Missing
if v.KODIVERSION >= 17:
self.cursor.execute(
"select coalesce(max(idArtist),1) from artist")
else:
self.cursor.execute(
"select coalesce(max(idArtist),0) from artist")
artistid = self.cursor.fetchone()[0] + 1 artistid = self.cursor.fetchone()[0] + 1
query = ( query = (
''' '''