Small fix in code for TMDB API

This commit is contained in:
echel0n 2014-12-20 09:07:04 -08:00
parent de1c40db01
commit 7e8b27fcd3
1 changed files with 1 additions and 1 deletions

View File

@ -991,7 +991,7 @@ class GenericMetadata():
search = tmdb.Search()
for show_name in set(allPossibleShowNames(show)):
for result in search.collection({'query': show_name})['results'] + search.tv({'query': show_name})['results']:
if result[types[type]]:
if types[type] and getattr(result, types[type]):
return "{0}{1}{2}".format(base_url, max_size, result[types[type]])
except Exception as e: