From a9e676eb8af8f9881c152dacbea450610e8002fa Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 20 Dec 2014 03:24:02 +0100 Subject: upgrade to ember.js --- imdb-lookup/index.jinja2.html | 251 +++++++++++------------------------------- 1 file changed, 65 insertions(+), 186 deletions(-) (limited to 'imdb-lookup/index.jinja2.html') diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html index 23e75fc..f19fdd0 100644 --- a/imdb-lookup/index.jinja2.html +++ b/imdb-lookup/index.jinja2.html @@ -1,232 +1,111 @@ - - - + + - + {{title}} - + + - {% for (path, imdb_id) in input %} - {% set info = tmdbcache.infos(imdb_id) %} - {% 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 = info['release_date'] and int(info['release_date'].split('-')[0]) or gmtime.tm_year %} - {% 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 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 %} - {% set userMeter = (omdb_data.tomatoUserMeter != 'N/A') and int(omdb_data.tomatoUserMeter) or None %} + {% raw %} + + + {% endraw %} + + +