{% extends "base.html" %} {% load app_tags %} {% load humanize %} {% block title %} {{ media.title }} {% if media.media_type == MediaTypes.SEASON.value %}S{{ media.season_number }}{% endif %} - Yamtrack {% endblock title %} {% block content %}
{# Top section #}
{# Poster #}
{{ media.title }}
{% if user_medias and media_type != MediaTypes.TV.value and media_type != MediaTypes.SEASON.value %} {# Dropdown with more tracking options #}
{# Create Track Modal #}
{% endif %} {# Track Modal #}
{# stop click propagation to avoid resetting the modal because this one doesn't have click once #}
{# Hero #}
{% if media.media_type == MediaTypes.SEASON.value %}

{{ media.title }}

{{ media.season_title }}

{# Season dropdown #}
{% else %}

{{ media.title }}

{% endif %} {# Genres #}
{% for genre in media.genres %} {{ genre }} {% endfor %}
{# Description #}

{{ media.synopsis|linebreaksbr|safe }}

{# Source score #}
{% if media.score_count is not None %}

{{ media.source|upper }} SCORE

{% include "app/icons/star.svg" with classes="w-5 h-5 mr-1.5 text-yellow-400 fill-yellow-400" %} {% if media.score is not None %} {{ media.score }}/10 {% else %} - {% endif %}

{{ media.score_count|intcomma }} vote{{ media.score_count|pluralize }}

{% endif %} {# User score #} {% if user_medias %}

YOUR SCORE

{% include "app/icons/star.svg" with classes="w-5 h-5 mr-1.5 text-yellow-400 fill-yellow-400" %}

Click to edit

{% with rating_range=10|get_range %} {% for rating_value in rating_range %} {% endfor %} {% endwith %}
{% endif %}
{# Section filter links (desktop: pinned to bottom of top section) #} {% include "app/components/media_section_tabs.html" with extra_classes="max-md:hidden mt-auto pt-6" %}
{# Bottom section #}
{# Sidebar #}
{# Your History #} {% if current_instance.start_date or current_instance.end_date or current_instance.notes or current_instance.progress and media.media_type != MediaTypes.MOVIE.value %}

Your History

{% if current_instance.start_date %}
Started: {{ current_instance.start_date|datetime_format:user }}
{% endif %} {% if current_instance.end_date %}
Ended: {{ current_instance.end_date|datetime_format:user }}
{% endif %} {% if media_type != MediaTypes.MOVIE.value %}
Progress: {{ current_instance.formatted_progress }} {% if current_instance.max_progress %}/ {{ current_instance.max_progress }}{% endif %}
{% endif %}
{# Your notes #} {% if current_instance.notes %}
{% include "app/icons/page-empty.svg" with classes="w-3.5 h-3.5 mr-1.5 text-yellow-400 shrink-0" %} Your notes

"{{ current_instance.notes|linebreaksbr }}"

{% endif %}
{% endif %} {# Actions #}

Actions

{# Custom Lists #}
{# Activity History #}
{# Sync metadata #}
{# Media Details #}

Details

{% if media.details.items %} {% for key, value in media.details.items %}

{{ key|no_underscore }}

{% if value|is_list %} {% for item in value %}

{{ item|iso_date_format:request.user }}

{% endfor %} {% else %}

{{ value|default_if_none:"Unknown"|iso_date_format:request.user }}

{% endif %}
{% endfor %} {% if media.external_links %}

Links

{% for name, url in media.external_links.items %} {{ name }} {% endfor %}
{% endif %} {% else %}
No details available
{% endif %}
{# Tab content #}
{# Section filter links (mobile: directly above the tab content) #} {% include "app/components/media_section_tabs.html" with extra_classes="md:hidden mb-6" %} {% if media.cast %}

Cast

{% for cast in media.cast %} {% include "app/components/cast_card.html" with cast=cast %} {% endfor %} {% if media.total_cast_count > 30 %}
{% include "app/icons/external-link.svg" with classes="w-6 h-6" %}
View all {{ media.total_cast_count }} cast members
{% endif %}
{% endif %} {# Related Media #} {% if media.related %} {% for name, related_items in media.related.items %} {% if related_items %}

{% if name == "dlcs" %} DLCs {% else %} {{ name|no_underscore|title }} {% endif %}

{% for result in related_items %} {# Set active to highlight the current movie in a collection. Avoid TV media, since seasons have same ID as the parent show #} {% if media_type == MediaTypes.MOVIE.value %} {% include "app/components/media_card.html" with item=result.item title=result.item.season_title|default:result.item.title media=result.media active=media.media_id|str_equals:result.item.media_id %} {% else %} {% include "app/components/media_card.html" with item=result.item title=result.item.season_title|default:result.item.title media=result.media %} {% endif %} {% endfor %}
{% endif %} {% endfor %} {% endif %} {# Repeats #} {% if user_medias|length > 1 %}

Repeats ({{ user_medias|length|add:"-1" }})

{% for user_media in user_medias|slice:"1:" %}
{% if user_media.score %} {% include "app/icons/star.svg" with classes="w-4 h-4 text-yellow-400 fill-yellow-400 shrink-0" %} {{ user_media.score }} {% else %} {% include "app/icons/star.svg" with classes="w-4 h-4 text-gray-500 fill-gray-500 shrink-0" %} – {% endif %} · {{ user_media.status|media_status_readable }}
{% if media.media_type != MediaTypes.MOVIE.value %}

{{ user_media.formatted_progress }} {% if media.media_type != MediaTypes.GAME.value %} {{ media_type|long_unit|lower }}{{ user_media.progress|pluralize }} {% endif %}

{% endif %} {% if user_media.start_date or user_media.end_date %}

{% if user_media.start_date and user_media.end_date %} {{ user_media.start_date|datetime_format:user }} – {{ user_media.end_date|datetime_format:user }} {% elif user_media.start_date %} Started {{ user_media.start_date|datetime_format:user }} {% else %} Finished {{ user_media.end_date|datetime_format:user }} {% endif %}

{% endif %} {% if user_media.notes %}
{% include "app/icons/page-empty.svg" with classes="w-3 h-3 mr-1 text-yellow-400 shrink-0 mt-0.5" %}

"{{ user_media.notes|linebreaksbr }}"

{% endif %}
{% endfor %}
{% endif %} {# Episodes List #} {% if media.episodes %}

Episodes

{% for episode in media.episodes %}
E{{ episode.episode_number }}

{{ episode.title }}

Episode {{ episode.episode_number }} • {{ episode.air_date|iso_date_format:request.user|default_if_none:"Unknown air date" }} {% if episode.runtime %}• {{ episode.runtime }}{% endif %}

{# Track Episode #}
{% include "app/components/fill_track_episode.html" with request=request media=media episode=episode episode_title=episode.title csrf_token=csrf_token TRACK_TIME=TRACK_TIME only %}
{# Lists #}
{# History #}

{{ episode.overview }}

{% if episode.history %}

Last watched: {% if episode.history.0.end_date %} {{ episode.history.0.end_date|datetime_format:user }} {% else %} No date provided {% endif %} {% if episode.history|length > 1 %}• Watched {{ episode.history|length }} times{% endif %}

{% endif %}
{% endfor %}
{% endif %} {# Streaming providers #} {% if media_type == MediaTypes.MOVIE.value or media_type == MediaTypes.TV.value %} {% if watch_provider_region == "UNSET" or watch_providers %}

Streaming

{% if watch_provider_region == "UNSET" %} {% url 'preferences' as preferences_url %}

Watch provider region is not configured. Set a region or disable this feature in the preferences.

{% else %}
{% for provider in watch_providers %}
{{ provider.provider_name }} {{ provider.provider_name }}
{% endfor %}
{% endif %}
{% endif %} {% endif %} {# Time to Beat #} {% if media.time_to_beat %}

Time to Beat

{% if media.time_to_beat.hastily %}
{% include "app/icons/gamepad-directional.svg" with classes="w-5 h-5" %}
{{ media.time_to_beat.hastily|seconds_to_duration }}

Main Story

{% endif %} {% if media.time_to_beat.normally %}
{% include "app/icons/award.svg" with classes="w-5 h-5" %}
{{ media.time_to_beat.normally|seconds_to_duration }}

Main + Extra

{% endif %} {% if media.time_to_beat.completely %}
{% include "app/icons/trophy.svg" with classes="w-5 h-5" %}
{{ media.time_to_beat.completely|seconds_to_duration }}

Completionist

{% endif %}
{% endif %}
{% endblock content %}