{% for (path, imdb_id) in input %} {% set info = tmdbcache.infos(imdb_id) %} {% if info %} {% set year = int(info['release_date'].split('-')[0]) %} {% set age = gmtime.tm_year - year %} {% 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 omdb_data = tmdbcache.omdb_movie(imdb_id) %} {% 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 %}
{% if "vote_average" in info.keys() %} {% if userMeter %} {% else %} {% endif %} {% if fresh %} {% else %} {% endif %} {% endif %}
{{ " ".join(["☆"] * (10-int(imdb_data["rating"]))) }} {{ " ".join(["★"] * int(imdb_data["rating"])) }} {{ " ".join(["☆"] * (10-int(userMeter/10))) }} {{ " ".join(["★"] * int(userMeter/10)) }} {% for i in range(int(fresh/10),10) %}   {% endfor %} {% for i in range(0, int(fresh/10)) %}   {% endfor %} {{ " ".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, {{year}} {% if omdb_data.Rated != 'N/A' %} {{omdb_data.Rated}} {% endif %}
Starring: {{ imdb_data["cast_summary"] | join(", ", attribute="name.name") }}

{{ imdb_data.plot.outline }}
{% if 'homepage' in info and info['homepage'] %} {% elif omdb_data.Website != "N/A" %} {% endif %}
{{ info['homepage'] }}
{{ omdb_data.Website }}
themoviedb.org   ➜ imdb.com   ➜ letterboxd.com   ➜ ofdb.db   ➜ {{ info.imdb_id }}
{% else %}
No infos for {{path}} {{imdb_id}}
{% endif %} {% endfor %}