diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 684453b1..65812756 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -2150,13 +2150,31 @@ class Music(Items): artist_edb = emby_db.getItem_byId(artist_eid) artistid = artist_edb[0] finally: - query = ( - ''' - INSERT OR REPLACE INTO song_artist(idArtist, idSong, iOrder, strArtist) - VALUES (?, ?, ?, ?) - ''' - ) - kodicursor.execute(query, (artistid, songid, index, artist_name)) + if self.kodiversion >= 17: + # Kodi Krypton + query = ( + ''' + INSERT OR REPLACE INTO song_artist(idArtist, idSong, idRole, iOrder, strArtist) + VALUES (?, ?, ?, ?, ?) + ''' + ) + kodicursor.execute(query,(artistid, songid, 1, index, artist_name)) + # May want to look into only doing this once? + query = ( + ''' + INSERT OR REPLACE INTO role(idRole, strRole) + VALUES (?, ?) + ''' + ) + kodicursor.execute(query, (1, 'Composer')) + else: + query = ( + ''' + INSERT OR REPLACE INTO song_artist(idArtist, idSong, iOrder, strArtist) + VALUES (?, ?, ?, ?) + ''' + ) + kodicursor.execute(query, (artistid, songid, index, artist_name)) # Verify if album artist exists album_artists = [] diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 2a020222..0afe7e3b 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -394,7 +394,7 @@ def getKodiVideoDBPath(): "14": 90, # Helix "15": 93, # Isengard "16": 99, # Jarvis - "17": 106 # Krypton + "17": 107 # Krypton } dbPath = tryDecode(xbmc.translatePath( diff --git a/resources/lib/videonodes.py b/resources/lib/videonodes.py index fc81c78f..880ba574 100644 --- a/resources/lib/videonodes.py +++ b/resources/lib/videonodes.py @@ -250,7 +250,11 @@ class VideoNodes(object): if mediatype == "photos": windowpath = "ActivateWindow(Pictures,%s,return)" % path else: - windowpath = "ActivateWindow(Video,%s,return)" % path + if self.kodiversion >= 17: + # Krypton + windowpath = "ActivateWindow(Videos,%s,return)" % path + else: + windowpath = "ActivateWindow(Video,%s,return)" % path if nodetype == "all": @@ -370,7 +374,11 @@ class VideoNodes(object): "special://profile/library/video/")) nodeXML = "%splex_%s.xml" % (nodepath, cleantagname) path = "library://video/plex_%s.xml" % cleantagname - windowpath = "ActivateWindow(Video,%s,return)" % path + if self.kodiversion >= 17: + # Krypton + windowpath = "ActivateWindow(Videos,%s,return)" % path + else: + windowpath = "ActivateWindow(Video,%s,return)" % path # Create the video node directory if not xbmcvfs.exists(nodepath):