From 11f9a891f0d1dbf7fa5f444e1a67a80f2c65636b Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 18 Mar 2014 16:38:39 -0700 Subject: [PATCH] Update generic.py Fix for invalid key when looking for _banners --- sickbeard/metadata/generic.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sickbeard/metadata/generic.py b/sickbeard/metadata/generic.py index 40d4f0fc..8e9ac123 100644 --- a/sickbeard/metadata/generic.py +++ b/sickbeard/metadata/generic.py @@ -800,7 +800,10 @@ class GenericMetadata(): return result # if we have no season banners then just finish - if getattr(indexer_show_obj, '_banners', None) is None or 'season' not in indexer_show_obj['_banners'] or 'season' not in indexer_show_obj['_banners']['season']: + if getattr(indexer_show_obj, '_banners', None) is None: + return result + + if 'season' not in indexer_show_obj['_banners'] or 'season' not in indexer_show_obj['_banners']['season']: return result # Give us just the normal poster-style season graphics @@ -965,4 +968,4 @@ class GenericMetadata(): url = "{0}{1}{2}".format(base_url, max_size, rel_path) return url - return None \ No newline at end of file + return None