ony lookup imdb if title and director exist
This commit is contained in:
parent
66e03ef508
commit
55b9e8bd8f
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ def get_data(id, timeout=ox.cache.cache_timeout, get_imdb=False):
|
||||||
|
|
||||||
if timeout == ox.cache.cache_timeout:
|
if timeout == ox.cache.cache_timeout:
|
||||||
timeout = -1
|
timeout = -1
|
||||||
if get_imdb:
|
if get_imdb and 'title' in data and 'director' in data:
|
||||||
# removed year, as "title (year)" may fail to match
|
# removed year, as "title (year)" may fail to match
|
||||||
data['imdbId'] = imdb.get_movie_id(data['title'], data['director'], timeout=timeout)
|
data['imdbId'] = imdb.get_movie_id(data['title'], data['director'], timeout=timeout)
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue