Compatibility with latest Kodi Krypton. Fixes #80

This commit is contained in:
tomkat83 2016-08-12 18:35:03 +02:00
parent 991a808403
commit 900290c75a
3 changed files with 36 additions and 10 deletions

View File

@ -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 = []

View File

@ -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(

View File

@ -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):