From 40b87932d30980b26eff81f9184441a119a13dd7 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 11 Dec 2014 00:41:12 +0100 Subject: posters cache --- imdb-lookup/imdbinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'imdb-lookup/imdbinfo.py') diff --git a/imdb-lookup/imdbinfo.py b/imdb-lookup/imdbinfo.py index 096475f..970b284 100755 --- a/imdb-lookup/imdbinfo.py +++ b/imdb-lookup/imdbinfo.py @@ -114,7 +114,7 @@ class TMDBCache(object): key = "poster_{}_{}".format(f, hashlib.md5(poster_path.encode('utf-8')).hexdigest()[0:10]) keyContentType = "{}_ct".format(key) url = "http://image.tmdb.org/t/p/{}/{}".format(f, poster_path) - if key not in self.db_images: + if key not in self.db_images or keyContentType not in self.db_images: r = requests.get(url) self.db_images[key] = r.content self.db_images[keyContentType] = r.headers['content-type'] -- cgit v1.2.1