{% extends "item_base.html" %}
{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% load mastodon %}
{% load strip_scheme %}
{% load thumb %}
<!-- class specific details -->
{% block details %}
  <div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
  {% with item.all_seasons as seasons %}
    {% if seasons %}
      <div>
        {% trans 'all seasons' %}:
        {% for s in seasons %}
          <span class="season-number">
            <a {% if s == item %}class="current"     {% else %}   href="{{ s.url }}"     {% endif %}>{{ s.season_number|default:"#" }}</a>
          </span>
        {% endfor %}
      </div>
    {% endif %}
  {% endwith %}
  <div>{% include '_people.html' with people=item.director role='director' max=5 %}</div>
  <div>{% include '_people.html' with people=item.playwright role='playwright' max=5 %}</div>
  <div>{% include '_people.html' with people=item.actor role='actor' max=5 %}</div>
  <div>{% include '_people.html' with people=item.genre role='genre' max=10 %}</div>
  <div>{% include '_people.html' with people=item.area role='region' max=10 %}</div>
  <div>{% include '_people.html' with people=item.language role='language' max=5 %}</div>
  <div>
    {% if item.season_number %}
      {% trans 'season number' %}: {{ item.season_number }}
    {% endif %}
  </div>
  <div>
    {% if item.season_count %}
      {% trans 'number of seasons' %}: {{ item.season_count }}
    {% endif %}
  </div>
  <div>
    {% if item.episode_count %}
      {% trans 'number of episodes' %}: {{ item.episode_count }}
    {% endif %}
  </div>
  <div>
    {% if item.single_episode_length %}
      {% trans 'episode Length' %}: {{ item.single_episode_length }}
    {% endif %}
  </div>
  <div>
    {% if item.duration %}
      {% trans 'length' %}: {{ item.duration }}
    {% endif %}
  </div>
  <div>
    {% if item.showtime %}
      {% trans 'release date' %}:
      {% for showtime in item.showtime %}
        <span>{{ showtime.time }}
          {% if showtime.region %}({{ showtime.region }}){% endif %}
        </span>
        {% if not forloop.last %}/{% endif %}
      {% endfor %}
    {% endif %}
  </div>
  <div>
    {% if item.imdb %}
      {% trans 'IMDb' %}: <a href="https://www.imdb.com/title/{{ item.imdb }}/"
    target="_blank"
    rel="noopener">{{ item.imdb }}</a>
    {% endif %}
  </div>
  <div>
    {% if item.site %}
      {% trans 'website' %}:
      <a href="{{ item.site }}" target="_blank" rel="noopener">{{ item.site|strip_scheme }}</a>
    {% endif %}
  </div>
  {% if item.other_info %}
    {% for k, v in item.other_info.items %}<div>{{ k }}: {{ v|urlizetrunc:24 }}</div>{% endfor %}
  {% endif %}
{% endblock %}
