summaryrefslogtreecommitdiff
path: root/imdb-lookup/imdbinfo.py
diff options
context:
space:
mode:
Diffstat (limited to 'imdb-lookup/imdbinfo.py')
-rwxr-xr-ximdb-lookup/imdbinfo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/imdb-lookup/imdbinfo.py b/imdb-lookup/imdbinfo.py
index 26129b8..71fd5f7 100755
--- a/imdb-lookup/imdbinfo.py
+++ b/imdb-lookup/imdbinfo.py
@@ -175,7 +175,7 @@ def do_index(args, imdb_ids):
print("Failed to import jinja2 library for html-templating")
sys.exit(1)
template_file = os.path.join(os.path.dirname(__file__), "index.jinja2.html")
- template = Template(open(template_file).read())
+ template = Template(open(template_file, "rb").read().decode('utf-8'))
with TMDBCache() as tmdbcache:
#infos = list(map(tmdbcache.infos, imdb_ids))
#posters = list(map(asBase64, map(tmdbcache.poster, map(lambda info: info['poster_path'], infos))))
@@ -184,6 +184,7 @@ def do_index(args, imdb_ids):
'tmdbcache' : Protector(tmdbcache),
'title' : 'Movie overview',
'urlencode' : urlencode,
+ 'int' : int,
}
assert not os.path.exists("index.html"), "index.html already exists"
stream = template.generate(mapping)