parent
f8bfb981ef
commit
fdd07b77e3
1 changed files with 5 additions and 5 deletions
|
@ -1256,26 +1256,26 @@ class API():
|
||||||
favorite = False
|
favorite = False
|
||||||
try:
|
try:
|
||||||
playcount = int(item['viewCount'])
|
playcount = int(item['viewCount'])
|
||||||
except KeyError:
|
except (KeyError, ValueError):
|
||||||
playcount = None
|
playcount = None
|
||||||
played = True if playcount else False
|
played = True if playcount else False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
lastPlayedDate = DateToKodi(int(item['lastViewedAt']))
|
lastPlayedDate = DateToKodi(int(item['lastViewedAt']))
|
||||||
except KeyError:
|
except (KeyError, ValueError):
|
||||||
lastPlayedDate = None
|
lastPlayedDate = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
userrating = int(float(item['userRating']))
|
userrating = int(float(item['userRating']))
|
||||||
except KeyError:
|
except (KeyError, ValueError):
|
||||||
userrating = 0
|
userrating = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
rating = float(item['audienceRating'])
|
rating = float(item['audienceRating'])
|
||||||
except KeyError:
|
except (KeyError, ValueError):
|
||||||
try:
|
try:
|
||||||
rating = float(item['rating'])
|
rating = float(item['rating'])
|
||||||
except KeyError:
|
except (KeyError, ValueError):
|
||||||
rating = 0.0
|
rating = 0.0
|
||||||
|
|
||||||
resume, runtime = self.getRuntime()
|
resume, runtime = self.getRuntime()
|
||||||
|
|
Loading…
Reference in a new issue