From 00c0556300041cecf91715a5a1707504f42bd96e Mon Sep 17 00:00:00 2001
From: xnappo <cnappi@gmail.com>
Date: Sun, 28 Aug 2016 16:49:01 -0500
Subject: [PATCH] Fix for Krypton

---
 resources/lib/itemtypes.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py
index 51abdf3c..73dc4c59 100644
--- a/resources/lib/itemtypes.py
+++ b/resources/lib/itemtypes.py
@@ -2304,7 +2304,10 @@ class Music(Items):
 
         elif mediatype == "album":
             # Process playstates
-            query = "UPDATE album SET iRating = ? WHERE idAlbum = ?"
+            if self.kodiversion >= 17:
+                query = "UPDATE album SET fRating = ? WHERE idAlbum = ?"
+            else:
+                query = "UPDATE album SET iRating = ? WHERE idAlbum = ?"            
             kodicursor.execute(query, (rating, kodiid))
 
         emby_db.updateReference(itemid, checksum)