{% 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 #}
{{ media.title }}
{# Track Modal #}
{# stop click propagation to avoid resetting the modal because this one doesn't have click once #}
{# Media details #}
{% 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 }}

{% if current_instance.notes %}
{% include "app/icons/page-empty.svg" with classes="w-5 h-5 mr-2 text-yellow-400 shrink-0 mt-0.5" %}
YOUR NOTES

"{{ current_instance.notes|linebreaksbr }}"

{% endif %}
{# 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 %}
{# Details Column #}
{# Your History #} {% if user_medias|length > 1 or current_instance.start_date or current_instance.end_date or current_instance.progress and media.media_type != MediaTypes.MOVIE.value %}

Your History

{% if media_type != MediaTypes.TV.value and media_type != MediaTypes.SEASON.value %}
{# Track Modal #}
{% endif %}
{% 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 %}
{% if user_medias|length > 1 %}
{% for user_media in user_medias|slice:"1:" %}
{% if user_media.score %} {% include "app/icons/star.svg" with classes="w-4 h-4 mr-2 text-yellow-400 fill-yellow-400" %} {% else %} {% include "app/icons/star.svg" with classes="w-4 h-4 mr-2 text-gray-400 fill-gray-400" %} {% endif %} {% if user_media.score %} {{ user_media.score }} {% else %} Not rated {% endif %}
Status: {{ user_media.status|media_status_readable }}
{% if media.media_type != MediaTypes.MOVIE.value %}
Progress: {{ 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 %}
Started: {{ user_media.start_date|datetime_format:user }}
{% endif %} {% if user_media.end_date %}
Finished: {{ user_media.end_date|datetime_format:user }}
{% 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 %}
{% endif %} {# Actions #}

Actions

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

Details

{% if watch_provider_region == "UNSET" or watch_providers is not None %}

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.

{% elif watch_providers %}
{% for provider in watch_providers %} {{ provider.provider_name }} {% endfor %}
{% else %}

No watch providers

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

{{ key|no_underscore|upper }}

{% 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 %}

SOURCE

{{ media.source|source_readable }}
{% if media.external_links %}

EXTERNAL LINKS

{% for name, url in media.external_links.items %} {{ name }} {% endfor %}
{% endif %} {% else %}
No details available
{% endif %}
{% 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 %} {# 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 %}
{% endblock content %}