summaryrefslogtreecommitdiff
path: root/imdb-lookup
diff options
context:
space:
mode:
Diffstat (limited to 'imdb-lookup')
-rw-r--r--imdb-lookup/index.jinja2.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html
index b09abf1..e55c855 100644
--- a/imdb-lookup/index.jinja2.html
+++ b/imdb-lookup/index.jinja2.html
@@ -86,14 +86,14 @@
<body>
{% for (path, imdb_id) in input %}
{% set info = tmdbcache.infos(imdb_id) %}</h2>
- {% if info %}
+ {% set imdb_data = tmdbcache.imdb_movie(imdb_id)['data'] %}
+ {% set omdb_data = tmdbcache.omdb_movie(imdb_id) %}
+ {% if info and imdb_data and omdb_data %}
{% set year = int(info['release_date'].split('-')[0]) %}
{% set age = gmtime.tm_year - year %}
{% set centuries = int(age / 10) %}
{% set posterBase64 = tmdbcache.poster_base64(info['poster_path'],'w154') %}
{% set local_title = tmdbcache.alternative_title(imdb_id, "DE") %}
- {% set imdb_data = tmdbcache.imdb_movie(imdb_id)['data'] %}
- {% set omdb_data = tmdbcache.omdb_movie(imdb_id) %}
{% set votes = imdb_data['num_votes'] %}
{% set popularity = int( 9*(1 - (1+math.exp(-1))/(1+math.exp(votes/70000.0 -1 ))) + 1 ) %}
{% set fresh = (omdb_data.tomatoMeter != 'N/A') and int(omdb_data.tomatoMeter) or None %}