From fdd07b77e38649e5d5562d8683e5788447fdfaca Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sun, 26 Feb 2017 16:40:04 +0100 Subject: [PATCH] Fix ValueError for Watch Later - Fixes #235 --- resources/lib/PlexAPI.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 37350607..e78621d5 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -1256,26 +1256,26 @@ class API(): favorite = False try: playcount = int(item['viewCount']) - except KeyError: + except (KeyError, ValueError): playcount = None played = True if playcount else False try: lastPlayedDate = DateToKodi(int(item['lastViewedAt'])) - except KeyError: + except (KeyError, ValueError): lastPlayedDate = None try: userrating = int(float(item['userRating'])) - except KeyError: + except (KeyError, ValueError): userrating = 0 try: rating = float(item['audienceRating']) - except KeyError: + except (KeyError, ValueError): try: rating = float(item['rating']) - except KeyError: + except (KeyError, ValueError): rating = 0.0 resume, runtime = self.getRuntime()