From 2d6361d9d6e7d2034fdebc2c7cb9602a1021b3f9 Mon Sep 17 00:00:00 2001 From: Gerald Dachs Date: Thu, 24 Mar 2016 21:18:17 +0100 Subject: [PATCH] made it compatible to Krypton initialize rating --- resources/lib/itemtypes.py | 4 ++++ resources/lib/utils.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index d400b707..75945194 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1848,6 +1848,8 @@ class Music(Items): # Process the album info if kodiversion == 17: # Kodi Krypton + if not rating: + rating = 0.0 query = ' '.join(( "UPDATE album", @@ -2026,6 +2028,8 @@ class Music(Items): year = API.getYear() resume, duration = API.getRuntime() rating = userdata['UserRating'] + if not rating and kodiversion == 17: + rating = 0.0 #if enabled, try to get the rating from file and/or emby # if not self.directstream: diff --git a/resources/lib/utils.py b/resources/lib/utils.py index aadeca3a..316ab8ff 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -369,7 +369,8 @@ def getKodiVideoDBPath(): "13": 78, # Gotham "14": 90, # Helix "15": 93, # Isengard - "16": 99 # Jarvis + "16": 99, # Jarvis + "17":104 # Krypton } dbPath = xbmc.translatePath( @@ -385,7 +386,8 @@ def getKodiMusicDBPath(): "13": 46, # Gotham "14": 48, # Helix "15": 52, # Isengard - "16": 56 # Jarvis + "16": 56, # Jarvis + "17": 60 # Krypton } dbPath = xbmc.translatePath(