From 7e8b27fcd3a356a81508ffdadf72338fbb0fcf76 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sat, 20 Dec 2014 09:07:04 -0800 Subject: [PATCH] Small fix in code for TMDB API --- sickbeard/metadata/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sickbeard/metadata/generic.py b/sickbeard/metadata/generic.py index d32f612a..a1392759 100644 --- a/sickbeard/metadata/generic.py +++ b/sickbeard/metadata/generic.py @@ -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: