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,6 +2150,24 @@ class Music(Items):
artist_edb = emby_db.getItem_byId(artist_eid)
artistid = artist_edb[0]
finally:
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)

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

@ -249,6 +249,10 @@ class VideoNodes(object):
if mediatype == "photos":
windowpath = "ActivateWindow(Pictures,%s,return)" % path
else:
if self.kodiversion >= 17:
# Krypton
windowpath = "ActivateWindow(Videos,%s,return)" % path
else:
windowpath = "ActivateWindow(Video,%s,return)" % path
@ -370,6 +374,10 @@ class VideoNodes(object):
"special://profile/library/video/"))
nodeXML = "%splex_%s.xml" % (nodepath, cleantagname)
path = "library://video/plex_%s.xml" % cleantagname
if self.kodiversion >= 17:
# Krypton
windowpath = "ActivateWindow(Videos,%s,return)" % path
else:
windowpath = "ActivateWindow(Video,%s,return)" % path
# Create the video node directory