mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
i dont know
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
<div>
|
||||
<h1 class="display-4 fw-bold text-dark">TV Shows</h1>
|
||||
<div class="text-muted small mt-1">
|
||||
TV Shows collection coming soon
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,13 +22,13 @@
|
||||
value="{{ search }}"
|
||||
placeholder="Search TV shows..."
|
||||
class="form-control ps-5"
|
||||
disabled
|
||||
|
||||
>
|
||||
<svg class="position-absolute top-50 start-0 translate-middle-y ms-3 text-muted" width="20" height="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" disabled>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Search
|
||||
</button>
|
||||
</form>
|
||||
@@ -39,8 +38,6 @@
|
||||
{% for mode in view_modes %}
|
||||
<button
|
||||
class="btn btn-outline-secondary"
|
||||
disabled
|
||||
title="Coming Soon"
|
||||
>
|
||||
{% if mode == 'grid' %}
|
||||
<svg class="me-1" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
@@ -58,13 +55,232 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Coming Soon Message -->
|
||||
|
||||
{% if tvshows is empty %}
|
||||
<div class="text-center py-5">
|
||||
<svg class="mx-auto text-muted mb-3" width="48" height="48" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h4a1 1 0 010 2h-1v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6H3a1 1 0 010-2h4z"/>
|
||||
</svg>
|
||||
<h3 class="h5 fw-medium text-dark">TV Shows Coming Soon</h3>
|
||||
<p class="text-muted">TV show collection and management features are currently in development.</p>
|
||||
<h3 class="h5 fw-medium text-dark">
|
||||
{% if search %}
|
||||
No TV shows found matching "{{ search }}"
|
||||
{% else %}
|
||||
No TV shows found
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p class="text-muted">
|
||||
{% 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 %}
|
||||
</p>
|
||||
{% if search %}
|
||||
<a href="{{ path_for('tvshows.index') }}" class="btn btn-primary mt-3">
|
||||
View all TV shows
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- Movies content based on view mode -->
|
||||
{% if view_mode == 'list' %}
|
||||
<!-- List view -->
|
||||
<div class="card">
|
||||
<ul class="list-group list-group-flush">
|
||||
{% for movie in tvshows %}
|
||||
<li class="list-group-item">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="d-flex align-items-center">
|
||||
{% if movie.poster_url %}
|
||||
<img class="rounded me-3" style="width: 64px; height: 96px; object-fit: cover;" src="/images/{{ movie.poster_url }}" alt="{{ movie.title }}">
|
||||
{% else %}
|
||||
<div class="bg-light rounded me-3 d-flex align-items-center justify-content-center" style="width: 64px; height: 96px;">
|
||||
<svg class="text-muted" width="32" height="32" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h4a1 1 0 010 2h-1v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6H3a1 1 0 010-2h4z"/>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="flex-grow-1">
|
||||
<h3 class="h6 mb-1">
|
||||
<a href="{{ path_for('tvshows.show', {'id': movie.id}) }}" class="text-decoration-none">
|
||||
{{ movie.title }}
|
||||
</a>
|
||||
</h3>
|
||||
<div class="d-flex align-items-center gap-3 small text-muted">
|
||||
{% if movie.release_date %}
|
||||
<span>{{ movie.release_date|date('Y') }}</span>
|
||||
{% endif %}
|
||||
{% if movie.rating %}
|
||||
<span>⭐ {{ movie.rating }}/10</span>
|
||||
{% endif %}
|
||||
{% if movie.runtime_minutes %}
|
||||
<span>{{ (movie.runtime_minutes / 60)|round(1) }}h {{ movie.runtime_minutes % 60 }}m</span>
|
||||
{% endif %}
|
||||
<span>{{ movie.source_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
{% if movie.watched %}
|
||||
<span class="badge bg-success">
|
||||
Watched
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if movie.is_favorite %}
|
||||
<span class="badge bg-danger">
|
||||
Favorite
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% elseif view_mode == 'covers' %}
|
||||
<!-- Cover grid view -->
|
||||
<div class="row g-3">
|
||||
{% for movie in tvshows %}
|
||||
<div class="col-6 col-sm-4 col-md-3 col-lg-2">
|
||||
<div class="card h-100">
|
||||
{% if movie.poster_url %}
|
||||
<div class="position-relative" style="aspect-ratio: 2/3; overflow: hidden;">
|
||||
<img src="/images/{{ movie.poster_url }}" alt="{{ movie.title }}" class="card-img-top" style="width: 100%; height: 100%; object-fit: cover;">
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="d-flex align-items-center justify-content-center bg-light" style="aspect-ratio: 2/3; min-height: 200px;">
|
||||
<svg class="text-muted" width="48" height="48" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h4a1 1 0 010 2h-1v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6H3a1 1 0 010-2h4z"/>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<h6 class="card-title text-truncate" title="{{ movie.title }}">
|
||||
<a href="{{ path_for('tvshows.show', {'id': movie.id}) }}" class="text-decoration-none">
|
||||
{{ movie.title }}
|
||||
</a>
|
||||
</h6>
|
||||
{% if movie.release_date %}
|
||||
<p class="card-text small text-muted">{{ movie.release_date|date('Y') }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<!-- Default grid view -->
|
||||
<div class="row g-3">
|
||||
{% for movie in tvshows %}
|
||||
<div class="col-12 col-md-6 col-lg-3 col-xl-2">
|
||||
<div class="card h-100">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="flex-shrink-0">
|
||||
{% if movie.poster_url %}
|
||||
<img class="rounded" style="width: 64px; height: 96px; object-fit: cover;" src="/images/{{ movie.poster_url }}" alt="{{ movie.title }}">
|
||||
{% else %}
|
||||
<div class="bg-light rounded d-flex align-items-center justify-content-center" style="width: 64px; height: 96px;">
|
||||
<svg class="text-muted" width="32" height="32" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 4V2a1 1 0 011-1h8a1 1 0 011 1v2h4a1 1 0 010 2h-1v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6H3a1 1 0 010-2h4z"/>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="ms-3 flex-grow-1">
|
||||
<h5 class="card-title mb-1">
|
||||
<a href="{{ path_for('tvshows.show', {'id': movie.id}) }}" class="text-decoration-none">
|
||||
{{ movie.title }}
|
||||
</a>
|
||||
</h5>
|
||||
<div class="d-flex align-items-center gap-2 small text-muted mb-2">
|
||||
{% if movie.release_date %}
|
||||
<span>{{ movie.release_date|date('Y') }}</span>
|
||||
{% endif %}
|
||||
{% if movie.rating %}
|
||||
<span>⭐ {{ movie.rating }}/10</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if movie.source_name %}
|
||||
<p class="card-text small text-muted mb-2">
|
||||
{{ movie.source_name }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if movie.overview %}
|
||||
<div class="mt-3">
|
||||
<p class="card-text small text-muted" style="display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;">
|
||||
{{ movie.overview|slice(0, 150) }}{% if movie.overview|length > 150 %}...{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="mt-3 d-flex justify-content-between align-items-center small text-muted">
|
||||
{% if movie.runtime_minutes %}
|
||||
<span>{{ (movie.runtime_minutes / 60)|round(1) }}h {{ movie.runtime_minutes % 60 }}m</span>
|
||||
{% endif %}
|
||||
<div class="d-flex gap-1">
|
||||
{% if movie.watched %}
|
||||
<span class="badge bg-success">
|
||||
Watched
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if movie.is_favorite %}
|
||||
<span class="badge bg-danger">
|
||||
Favorite
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Pagination -->
|
||||
{% if pagination.total_pages > 1 %}
|
||||
<div class="d-flex align-items-center justify-content-between mt-4">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<label for="per_page" class="form-label mb-0">Show:</label>
|
||||
<select id="per_page" class="form-select form-select-sm w-auto">
|
||||
<option value="12" {{ pagination.per_page == 12 ? 'selected' : '' }}>12</option>
|
||||
<option value="24" {{ pagination.per_page == 24 ? 'selected' : '' }}>24</option>
|
||||
<option value="48" {{ pagination.per_page == 48 ? 'selected' : '' }}>48</option>
|
||||
<option value="100" {{ pagination.per_page == 100 ? 'selected' : '' }}>100</option>
|
||||
</select>
|
||||
<span class="text-muted small">per page</span>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
{% if pagination.has_prev %}
|
||||
<a href="?page={{ pagination.prev_page }}{% if search %}&search={{ search }}{% endif %}{% if pagination.per_page != 24 %}&per_page={{ pagination.per_page }}{% endif %}&view={{ view_mode }}"
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
Previous
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
{% for page_num in range(max(1, pagination.current_page - 2), min(pagination.total_pages, pagination.current_page + 2)) %}
|
||||
<a href="?page={{ page_num }}{% if search %}&search={{ search }}{% endif %}{% if pagination.per_page != 24 %}&per_page={{ pagination.per_page }}{% endif %}&view={{ view_mode }}"
|
||||
class="btn btn-sm {{ page_num == pagination.current_page ? 'btn-primary' : 'btn-outline-secondary' }}">
|
||||
{{ page_num }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if pagination.has_next %}
|
||||
<a href="?page={{ pagination.next_page }}{% if search %}&search={{ search }}{% endif %}{% if pagination.per_page != 24 %}&per_page={{ pagination.per_page }}{% endif %}&view={{ view_mode }}"
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
Next
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user