summaryrefslogtreecommitdiff
path: root/imdb-lookup
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-11-22 17:57:06 +0100
committerYves Fischer <yvesf-git@xapek.org>2014-11-22 17:57:06 +0100
commit32b069aad22041fa9cf79790655c425796b80d03 (patch)
tree04a85691fc369a88659220c9d6527dd858599c4e /imdb-lookup
parent30b8dea53f528d3cd90bb277a7285399bb5bbffe (diff)
downloadscripts-32b069aad22041fa9cf79790655c425796b80d03.tar.gz
scripts-32b069aad22041fa9cf79790655c425796b80d03.zip
links
Diffstat (limited to 'imdb-lookup')
-rwxr-xr-ximdb-lookup/imdbinfo.py5
-rw-r--r--imdb-lookup/index.jinja2.html6
2 files changed, 9 insertions, 2 deletions
diff --git a/imdb-lookup/imdbinfo.py b/imdb-lookup/imdbinfo.py
index bc9a062..09b9c03 100755
--- a/imdb-lookup/imdbinfo.py
+++ b/imdb-lookup/imdbinfo.py
@@ -10,6 +10,10 @@ import base64
import argparse
import math
import logging
+try:
+ from urllib.parse import quote_plus
+except:
+ from urllib import quote_plus
try:
import tmdbsimple as tmdb
@@ -179,6 +183,7 @@ def do_index(args, imdb_ids):
'input' : imdb_ids,
'tmdbcache' : Protector(tmdbcache),
'title' : 'Movie overview',
+ 'quote_plus' : quote_plus,
}
assert not os.path.exists("index.html"), "index.html already exists"
stream = template.generate(mapping)
diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html
index cecd2b9..977287f 100644
--- a/imdb-lookup/index.jinja2.html
+++ b/imdb-lookup/index.jinja2.html
@@ -16,13 +16,15 @@
<h2 style="">{{ info.title }}</h2>
<div style="width: 185px; float: left; min-height: 200px; border: 2px solid gray;">
{% if posterBase64 %}
- <img src="{{ posterBase64 }}" />
+ <a href="{{quote_plus(filename)}}">
+ <img src="{{ posterBase64 }}" />
+ </a>
{% else %}
<span> no image </span>
{% endif %}
</div>
<div style="">
- <div style="font-size: 1.2em;">
+ <div style="font-size: 1.2em; padding: 2em;">
{{ info.overview }}
</div>
<table style="padding: 2em;">