{% for (path, imdb_id) in input %} {% set info = tmdbcache.infos(imdb_id) %} {% if info %} {% set age = gmtime.tm_year - int(info['release_date'].split('-')[0]) %} {% set centuries = int(age / 10) %} {% set posterBase64 = tmdbcache.poster_base64(info['poster_path']) %} {% set local_title = tmdbcache.alternative_title(imdb_id, "DE") %} {% set imdb_data = tmdbcache.imdb_movie(imdb_id)['data'] %} {% set votes = imdb_data['num_votes'] %} {% set popularity = int( 9*(1 - (1+math.exp(-1))/(1+math.exp(votes/70000.0 -1 ))) + 1 ) %}
{% if "vote_average" in info.keys() %} {% endif %}
{{ " ".join(["☆"] * (10-int(info["vote_average"]))) }} {{ " ".join(["★"] * int(info["vote_average"])) }} {{info["vote_average"]}} {{ " ".join(["☆"] * (10-int(imdb_data["rating"]))) }} {{ " ".join(["★"] * int(imdb_data["rating"])) }} {{imdb_data["rating"]}} {{ " ".join(["☆"] * (10-popularity)) }} {{ " ".join(["★"] * popularity) }} {{ " ".join(["  "] * (9-centuries)) }} {{ " ".join(["⌚"] * (centuries + 1)) }} {% if posterBase64 %} {% else %} no image {% endif %}
{{ info.title }}
{% if local_title != info.title %} “{{ local_title }}”, {% endif %} {% if info.original_title != info.title %} “{{ info.original_title }}”, {% endif %}
by {{ imdb_data["directors_summary"] | join(", ", attribute="name.name") }}, runtime {{ info['runtime'] }} min.
Starring: {{ imdb_data["cast_summary"] | join(", ", attribute="name.name") }}

{{ imdb_data.plot.outline }}
{% if 'homepage' in info and info['homepage'] %} {% endif %}
Homepage {{ info['homepage'] }}
Release {{ info['release_date'] }} {% if age > 0 %}  ({{ age }} year{% if age > 1 %}s{% endif %}   old){% endif %}
themoviedb.org   ➜ imdb.com   ➜ letterboxd.com   ➜ ofdb.db
{% else %}
No infos for {{path}} {{imdb_id}}
{% endif %} {% endfor %}