ignoring missing imdb ids

This commit is contained in:
simon 2021-07-07 17:38:44 +07:00
parent fe98942440
commit 0893923523
1 changed files with 6 additions and 1 deletions

View File

@ -175,10 +175,15 @@ class ListParser():
for movie in all_movies:
try:
imdb = movie['ProviderIds']['Imdb']
except KeyError:
imdb = False
info_dict = {
'movie_name': movie['Name'],
'year': movie['Path'].split('/')[3],
'imdb': movie['ProviderIds']['Imdb'],
'imdb': imdb,
'genres': ', '.join(movie['Genres']),
'overview': movie['Overview'],
'duration_min': round(movie['RunTimeTicks'] / 600000000)