Skip to content

Commit cc7ce3c

Browse files
committed
Fixed the exception I was getting, missing +
1 parent e5a499f commit cc7ce3c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

custom_components/sensor/plex_recently_added.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,10 @@ def view_count(data):
365365

366366
def get_info(title):
367367
tmdb_url = requests.get('https://api.themoviedb.org/3/search/movie?'
368-
'api_key=1f7708bb9a218ab891a5d438b1b63992&query='
368+
+ 'api_key=1f7708bb9a218ab891a5d438b1b63992&query='
369369
+ title)
370-
tmdb_json = tmdb_url.json()
371-
return tmdb_json['results'][0]['overview']
370+
try:
371+
tmdb_json = tmdb_url.json()['results'][0]['overview']
372+
except:
373+
_LOGGER.warning("Failed to get information from TMDB")
374+
return tmdb_json

0 commit comments

Comments
 (0)