From 955d0ec021c8488118cac550a04819ebfe073654 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 11 Dec 2014 00:19:06 +0100 Subject: pick current year otherwise --- imdb-lookup/index.jinja2.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html index e55c855..23e75fc 100644 --- a/imdb-lookup/index.jinja2.html +++ b/imdb-lookup/index.jinja2.html @@ -89,7 +89,7 @@ {% 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 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') %} -- cgit v1.2.1