summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-12-11 00:41:12 +0100
committerYves Fischer <yvesf-git@xapek.org>2014-12-11 00:41:12 +0100
commit40b87932d30980b26eff81f9184441a119a13dd7 (patch)
treebf24b6e5189a7024ae3b6e53a804e9e474171781
parent41459cfc468b4d3046f12024586ca7a5c45a693b (diff)
downloadscripts-40b87932d30980b26eff81f9184441a119a13dd7.tar.gz
scripts-40b87932d30980b26eff81f9184441a119a13dd7.zip
posters cache
-rwxr-xr-ximdb-lookup/imdbinfo.py2
1 files changed, 1 insertions, 1 deletions
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']