From 91b9d3167d17966aa0800b73dd655a00e868e019 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Mon, 15 Jun 2015 19:41:40 -0500 Subject: [PATCH] Attempt at supporting Isengard Beta 2 --- resources/lib/Utils.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/resources/lib/Utils.py b/resources/lib/Utils.py index 505693fe..40bba457 100644 --- a/resources/lib/Utils.py +++ b/resources/lib/Utils.py @@ -62,16 +62,27 @@ def KodiSQL(type="video"): return connection def getKodiVideoDBPath(): - if xbmc.getInfoLabel("System.BuildVersion").startswith("13"): - #gotham + + kodibuild = xbmc.getInfoLabel("System.BuildVersion") + + if kodibuild.startswith("13"): + # Gotham dbVersion = "78" - if xbmc.getInfoLabel("System.BuildVersion").startswith("15"): - #isengard - dbVersion = "92" - else: - #helix + elif kodibuild.startswith("14"): + # Helix dbVersion = "90" - + elif kodibuild.startswith("15"): + # Isengard + if "BETA1" in kodibuild: + # Beta 1 + dbVersion = "92" + elif "BETA2" in kodibuild: + # Beta 2 + dbVersion = "93" + else: + # Not a compatible build + xbmc.log("This Kodi version is incompatible. Current version: %s" % kodibuild) + dbPath = xbmc.translatePath("special://profile/Database/MyVideos" + dbVersion + ".db") return dbPath @@ -79,8 +90,8 @@ def getKodiVideoDBPath(): def getKodiMusicDBPath(): if xbmc.getInfoLabel("System.BuildVersion").startswith("13"): #gotham - dbVersion = "48" - if xbmc.getInfoLabel("System.BuildVersion").startswith("15"): + dbVersion = "46" + elif xbmc.getInfoLabel("System.BuildVersion").startswith("15"): #isengard dbVersion = "52" else: