summaryrefslogtreecommitdiff
path: root/imdb-lookup
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-12-11 00:19:06 +0100
committerYves Fischer <yvesf-git@xapek.org>2014-12-11 00:19:06 +0100
commit955d0ec021c8488118cac550a04819ebfe073654 (patch)
tree44066f5bcff396854077ebb80545bc2b912b5b9c /imdb-lookup
parent31bd935c3b0df3982fca080d0edd1ef8ba396c20 (diff)
downloadscripts-955d0ec021c8488118cac550a04819ebfe073654.tar.gz
scripts-955d0ec021c8488118cac550a04819ebfe073654.zip
pick current year otherwise
Diffstat (limited to 'imdb-lookup')
-rw-r--r--imdb-lookup/index.jinja2.html2
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') %}