Skip to content

Commit 51cc791

Browse files
committed
Fix issue with missing 'value' key in 'ratings' dictionary
1 parent d73620c commit 51cc791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/radarr_upcoming_media/parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def parse_data(inData, tz, host, port, ssl, theaters):
115115
card_item['studio'] = movie.get('studio', '')
116116
card_item['genres'] = movie.get('genres', '')
117117

118-
if 'ratings' in movie and movie['ratings'].get('value', 0) > 0:
118+
if 'ratings' in movie and movie['ratings'] and movie['ratings'].get('value', 0) > 0:
119119
card_item['rating'] = ('\N{BLACK STAR} ' + str(movie['ratings']['value']))
120120
else:
121121
card_item['rating'] = ''

0 commit comments

Comments
 (0)