fix crash on sync when song rating is null in db (if user didn't reset the db)

resync is advised however to make sure the rating gets scraped initially
This commit is contained in:
marcelveldt 2016-01-18 16:31:07 +01:00
parent 72d279a3a9
commit 5640408523

View file

@ -2222,7 +2222,9 @@ class Music(Items):
else:
query = "SELECT rating FROM song WHERE idSong = ?"
kodicursor.execute(query, (kodiid,))
currentvalue = int(round(float(kodicursor.fetchone()[0]),0))
try:
currentvalue = int(round(float(kodicursor.fetchone()[0]),0))
except: currentvalue = None
# Only proceed if we actually have a rating from the file
if file_rating is None and currentvalue: