diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2014-12-11 00:19:06 +0100 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2014-12-11 00:19:06 +0100 |
commit | 955d0ec021c8488118cac550a04819ebfe073654 (patch) | |
tree | 44066f5bcff396854077ebb80545bc2b912b5b9c | |
parent | 31bd935c3b0df3982fca080d0edd1ef8ba396c20 (diff) | |
download | scripts-955d0ec021c8488118cac550a04819ebfe073654.tar.gz scripts-955d0ec021c8488118cac550a04819ebfe073654.zip |
pick current year otherwise
-rw-r--r-- | imdb-lookup/index.jinja2.html | 2 |
1 files changed, 1 insertions, 1 deletions
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') %} |