{% extends "layouts/app.twig" %} {% block content %}

TV Shows

{% for mode in view_modes %} {% endfor %}
{% if tvshows is empty %}

{% if search %} No TV shows found matching "{{ search }}" {% else %} No TV shows found {% endif %}

{% if search %} Try adjusting your search terms or browse all TV shows. {% else %} Start syncing your TV show libraries to see your TV shows here. {% endif %}

{% if search %} View all TV shows {% endif %}
{% else %} {% if view_mode == 'list' %}
{% elseif view_mode == 'covers' %}
{% for movie in tvshows %}
{% if movie.poster_url %}
{{ movie.title }}
{% else %}
{% endif %}
{{ movie.title }}
{% if movie.release_date %}

{{ movie.release_date|date('Y') }}

{% endif %}
{% endfor %}
{% else %}
{% for movie in tvshows %}
{% if movie.poster_url %} {{ movie.title }} {% else %}
{% endif %}
{{ movie.title }}
{% if movie.release_date %} {{ movie.release_date|date('Y') }} {% endif %} {% if movie.rating %} ⭐ {{ movie.rating }}/10 {% endif %}
{% if movie.source_name %}

{{ movie.source_name }}

{% endif %}
{% if movie.overview %}

{{ movie.overview|slice(0, 150) }}{% if movie.overview|length > 150 %}...{% endif %}

{% endif %}
{% if movie.runtime_minutes %} {{ (movie.runtime_minutes / 60)|round(1) }}h {{ movie.runtime_minutes % 60 }}m {% endif %}
{% if movie.watched %} Watched {% endif %} {% if movie.is_favorite %} Favorite {% endif %}
{% endfor %}
{% endif %} {% if pagination.total_pages > 1 %}
per page
{% if pagination.has_prev %} Previous {% endif %}
{% for page_num in range(max(1, pagination.current_page - 2), min(pagination.total_pages, pagination.current_page + 2)) %} {{ page_num }} {% endfor %}
{% if pagination.has_next %} Next {% endif %}
{% endif %} {% endif %}
{% endblock %}