From e73b467904e5d135034ab974657e57f24ba6747e Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Mon, 28 Mar 2016 10:40:30 +0200 Subject: [PATCH] Music: set default rating to 0, not NULL --- resources/lib/PlexAPI.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 6921eac4..a381bf08 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1573,10 +1573,7 @@ class API(): except: lastPlayedDate = None - try: - userrating = int(item['userRating']) - except: - userrating = None + userrating = int(item.get('userRating', 0)) resume, runtime = self.getRuntime() return {