{% extends "layouts/app.twig" %} {% block nav_controls %}
{% for genre in filters.genres %} {% endfor %} {% for year in filters.years %} {% endfor %}
{% for mode in view_modes %} {% if mode == 'grid' %} {% endif %} {% if mode == 'list' %} {% endif %} {% if mode == 'covers' %} {% endif %} {% endfor %}
{% for key, label in sort_options %} {{ label }} {% if sort == key %} {% endif %} {% endfor %}
{% endblock %} {% block sidebar %}

Filters

{% if available_filters.genres %}
{% endif %} {% if available_filters.years %}
{% endif %}
Clear All
{% if filters.genres or filters.years or search %}

Active Filters

{% if search %}
Search: "{{ search }}"
{% endif %} {% for genre in filters.genres %}
Genre: {{ genre }}
{% endfor %} {% for year in filters.years %}
Year: {{ year }}
{% endfor %}
{% endif %}

Quick Stats

Total TV Shows {{ pagination.total_items }}
This Page {{ tvshows|length }}
{% if pagination.total_pages > 1 %}
Page {{ pagination.current_page }} of {{ pagination.total_pages }}
{% endif %}
{% endblock %} {% block content %}

TV Shows Library

{% if pagination.total_items > 0 %}
{{ pagination.total_items }} TV shows from {{ tvshows|length > 0 ? tvshows|reduce((carry, tvshow) => carry + 1, 0) : 0 }} sources {% if search %} "{{ search }}" {% endif %}
{% endif %}
{% if pagination.total_items > 0 %}
{% if filters.genres %} {{ filters.genres|join(', ') }} {% endif %} {% if filters.years %} {{ filters.years|join(', ') }} {% endif %}
{% endif %}
{% if tvshows is empty %}

{% if search or filters.genres or filters.years %} No TV shows found {% else %} Your library is empty {% endif %}

{% if search or filters.genres or filters.years %} We couldn't find any TV shows matching your current search and filter criteria. Try adjusting your filters or search terms to discover more TV shows. {% else %} Start building your TV show library by syncing with Jellyfin, Plex, or other media sources. Your TV shows will appear here once synced. {% endif %}

{% if search or filters.genres or filters.years %} Clear Filters {% else %} Setup Sync {% endif %} Search All Media
{% if not (search or filters.genres or filters.years) %}

Need help getting started?

Check out the Jellyfin or Plex integration documentation for assistance with syncing your TV show libraries.

{% endif %}
{% else %} {% if view_mode == 'list' %}
    {% for tvshow in tvshows %} {% include 'components/tvshow-card.twig' with {'tvshow': tvshow, 'view_mode': 'list'} %} {% endfor %}
{% elseif view_mode == 'covers' %}
{% for tvshow in tvshows %} {% include 'components/tvshow-card.twig' with {'tvshow': tvshow, 'view_mode': 'covers'} %} {% endfor %}
{% else %}
{% for tvshow in tvshows %} {% include 'components/tvshow-card.twig' with {'tvshow': tvshow, 'view_mode': 'grid'} %} {% endfor %}
{% endif %} {% if pagination.total_pages > 1 %}
Showing {{ (pagination.current_page - 1) * pagination.per_page + 1 }} to {{ min(pagination.current_page * pagination.per_page, pagination.total_items) }} of {{ pagination.total_items }} TV shows
per page
{% if pagination.has_prev %} Previous {% else %} Previous {% endif %} {% set start_page = max(1, pagination.current_page - 2) %} {% set end_page = min(pagination.total_pages, pagination.current_page + 2) %} {% if start_page > 1 %} 1 {% if start_page > 2 %} ... {% endif %} {% endif %} {% for page_num in start_page..end_page %} {% if page_num == pagination.current_page %} {{ page_num }} {% else %} {{ page_num }} {% endif %} {% endfor %} {% if end_page < pagination.total_pages %} {% if end_page < pagination.total_pages - 1 %} ... {% endif %} {{ pagination.total_pages }} {% endif %} {% if pagination.has_next %} Next {% else %} Next {% endif %}
{% endif %} {% endif %}
{% endblock %}