From 85ed124b5d9a189d2eceb512c545f57b29e428de Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 22 Nov 2014 22:50:12 +0100 Subject: links to movies sites --- imdb-lookup/index.jinja2.html | 189 ++++++++++++++++++++++++++---------------- 1 file changed, 118 insertions(+), 71 deletions(-) (limited to 'imdb-lookup/index.jinja2.html') diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html index 019e937..b318b83 100644 --- a/imdb-lookup/index.jinja2.html +++ b/imdb-lookup/index.jinja2.html @@ -2,75 +2,122 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - - {{title}} - - - - {% for (filename, imdb_id) in input %} - {% set info = tmdbcache.infos(imdb_id) %} - {% set posterBase64 = tmdbcache.poster_base64(info['poster_path']) %} - {% if info %} -
- - - {% if "vote_average" in info.keys() %} - - {% endif %} - - - -
- {{ " ".join(["☆"] * (10-int(info["vote_average"]))) }} - {{ " ".join(["★"] * int(info["vote_average"])) }} - - {% if posterBase64 %} - - {% else %} - no image - {% endif %} - -
{{ info.title }}
-
{{ info.overview }}
- - {% for (key, value) in info.items() %} - {% if key in ['runtime','adult','homepage','release_date','original_title'] %} - - - - - {% endif %} - {% endfor %} -
{{ key }}{{ value }}
-
-
- {% else %} - No infos for {{filename}} {{imdb_id}} - {% endif %} - {% endfor %} - + + + {{title}} + + + + {% for (filename, imdb_id) in input %} + {% set info = tmdbcache.infos(imdb_id) %} + {% if info %} + {% set age = gmtime.tm_year - int(info['release_date'].split('-')[0]) %} + {% set centuries = int(age / 10) %} + {% set posterBase64 = tmdbcache.poster_base64(info['poster_path']) %} +
+ + + {% if "vote_average" in info.keys() %} + + + + {% endif %} + + + +
+ {{ " ".join(["☆"] * (10-int(info["vote_average"]))) }} + {{ " ".join(["★"] * int(info["vote_average"])) }} + + {{ " ".join(["☆"] * (10-int(info["popularity"]*10))) }} + {{ " ".join(["★"] * int(info["popularity"]*10)) }} + + {{ " ".join(["  "] * (10-centuries)) }} + {{ " ".join(["⌚"] * centuries) }} + + {% if posterBase64 %} + + {% else %} + no image + {% endif %} + +
+ {{ info.title }} + {% if info.title != info.original_title %} +  ({{ info.original_title }}) + {% endif %} +
+
{{ info.overview }}
+ + {% if 'runtime' in info %} + + + + + {% endif %} + {% if 'homepage' in info %} + + + + + {% endif %} + + + + + + + +
Runtime{{ info['runtime'] }}
Homepage{{ info['homepage'] }}
Release{{ info['release_date'] }} {% if age > 0 %}  ({{ age }} year{% if age > 1 %}s{% endif %}   old){% endif %}
+ → themoviedb.org +   + → imdb.com +   + → letterboxd.com +   + → ofdb.db +
+
+
+ {% else %} +
+ No infos for {{filename}} {{imdb_id}} +
+ {% endif %} + {% endfor %} + + -- cgit v1.2.1