diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2014-12-11 00:41:12 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2014-12-11 00:41:12 +0100 |
commit | 40b87932d30980b26eff81f9184441a119a13dd7 (patch) | |
tree | bf24b6e5189a7024ae3b6e53a804e9e474171781 /imdb-lookup | |
parent | 41459cfc468b4d3046f12024586ca7a5c45a693b (diff) | |
download | scripts-40b87932d30980b26eff81f9184441a119a13dd7.tar.gz scripts-40b87932d30980b26eff81f9184441a119a13dd7.zip |
posters cache
Diffstat (limited to 'imdb-lookup')
-rwxr-xr-x | imdb-lookup/imdbinfo.py | 2 |
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'] |