Files
MediaCollectorLibary/resources/views/adult/show.twig
Lars Behrends ca2d3a6960 ...
2025-10-18 22:03:30 +02:00

209 lines
12 KiB
Twig

{% extends "layouts/app.twig" %}
{% block content %}
<div class="px-4 py-3">
<!-- Back button -->
<div class="mb-4">
<a href="{{ path_for('adult.index') }}" class="btn btn-outline-secondary btn-sm">
<svg class="me-2" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
</svg>
Back to Adult Videos
</a>
</div>
<div class="card">
<div class="row g-0">
<!-- Video poster -->
<div class="col-md-4">
<div class="card-body">
<div style="background-color: #f8f9fa; border-radius: 0.375rem; overflow: hidden;">
{% if movie.poster_url %}
<img src="{{ movie.poster_url }}" alt="{{ movie.title }}" class="w-100" style="max-height: 400px; object-fit: contain;">
{% else %}
<div class="w-100 h-100 d-flex align-items-center justify-content-center">
<svg class="text-muted" width="96" height="96" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"/>
</svg>
</div>
{% endif %}
</div>
</div>
</div>
<!-- Video details -->
<div class="col-md-8">
<div class="card-body">
<div class="mb-4">
<h1 class="display-5 fw-bold text-dark mb-2">{{ movie.title }}</h1>
<!-- Video metadata -->
<div class="d-flex flex-wrap gap-3 small text-muted mb-3">
{% if movie.release_date %}
<span class="d-flex align-items-center">
<svg class="me-1" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
</svg>
{{ movie.release_date|date('Y') }}
</span>
{% endif %}
{% if movie.rating %}
<span class="d-flex align-items-center">
<svg class="me-1" width="16" height="16" fill="currentColor" viewBox="0 0 20 20">
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"/>
</svg>
{{ movie.rating }}/10
</span>
{% endif %}
{% if movie.runtime_minutes %}
<span class="d-flex align-items-center">
<svg class="me-1" width="16" height="16" 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"/>
</svg>
{{ (movie.runtime_minutes / 60)|round(1) }}h {{ movie.runtime_minutes % 60 }}m
</span>
{% endif %}
<span class="d-flex align-items-center">
<svg class="me-1" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/>
</svg>
{{ movie.source_name }}
</span>
</div>
<!-- Status badges -->
<div class="d-flex flex-wrap gap-2">
{% if movie.watched %}
<span class="badge bg-success d-flex align-items-center">
<svg class="me-1" width="12" height="12" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
</svg>
Watched
</span>
{% endif %}
{% if movie.watch_count > 0 %}
<span class="badge bg-primary">{{ movie.watch_count }} watch{{ movie.watch_count > 1 ? 'es' : '' }}</span>
{% endif %}
{% if movie.is_favorite %}
<span class="badge bg-danger d-flex align-items-center">
<svg class="me-1" width="12" height="12" fill="currentColor" viewBox="0 0 20 20">
<path d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z"/>
</svg>
Favorite
</span>
{% endif %}
</div>
</div>
<!-- Overview -->
{% if movie.overview %}
<div class="mb-4">
<h2 class="h5 fw-semibold text-dark mb-2">Overview</h2>
<p class="text-muted">{{ movie.overview }}</p>
</div>
{% endif %}
<!-- Additional details -->
<div class="row g-3">
<!-- Cast & Crew -->
{% if movie.cast or movie.director or movie.writer or movie.actors %}
<div class="col-md-6">
<h3 class="h6 fw-semibold text-dark mb-3">Cast & Crew</h3>
<dl class="row g-2">
{% if movie.director %}
<div class="col-4">
<dt class="small text-muted">Director</dt>
<dd class="small text-dark">{{ movie.director }}</dd>
</div>
{% endif %}
{% if movie.writer %}
<div class="col-4">
<dt class="small text-muted">Writer</dt>
<dd class="small text-dark">{{ movie.writer }}</dd>
</div>
{% endif %}
{% if movie.cast %}
<div class="col-12">
<dt class="small text-muted">Cast</dt>
<dd class="small text-dark">{{ movie.cast }}</dd>
</div>
{% endif %}
</dl>
<!-- Actors with thumbnails -->
{% if movie.actors %}
<div class="mt-3">
<h4 class="h6 fw-semibold text-dark mb-2">Performers</h4>
<div class="d-flex flex-wrap gap-2">
{% for actor in movie.actors %}
<a href="{{ path_for('actors.show', {'id': actor.id}) }}" class="text-decoration-none">
<div class="d-flex flex-column align-items-center" style="width: 60px;">
{% if actor.thumbnail_path %}
<img src="/public/images/{{ actor.thumbnail_path }}" alt="{{ actor.name }}" class="rounded-circle mb-1" style="width: 40px; height: 40px; object-fit: cover;">
{% else %}
<div class="rounded-circle bg-light d-flex align-items-center justify-content-center mb-1" style="width: 40px; height: 40px;">
<svg class="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="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
</svg>
</div>
{% endif %}
<span class="small text-muted text-center" style="font-size: 0.75rem;">{{ actor.name }}</span>
</div>
</a>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endif %}
<!-- Genres & Studios -->
{% if movie.genre or metadata.studios %}
<div class="col-md-6">
<h3 class="h6 fw-semibold text-dark mb-3">Details</h3>
<dl class="row g-2">
{% if movie.genre %}
<div class="col-4">
<dt class="small text-muted">Genre</dt>
<dd class="small text-dark">{{ movie.genre }}</dd>
</div>
{% endif %}
{% if metadata.studios %}
<div class="col-12">
<dt class="small text-muted">Studio</dt>
<dd class="small text-dark">{{ metadata.studios|join(', ') }}</dd>
</div>
{% endif %}
</dl>
</div>
{% endif %}
</div>
<!-- Metadata (for debugging/advanced users) -->
{% if metadata %}
<div class="mt-4 pt-4 border-top">
<details class="group">
<summary class="cursor-pointer small fw-medium text-muted hover:text-dark d-flex align-items-center">
<svg class="me-2 group-open:rotate-90 transition-transform" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
</svg>
Technical Details
</summary>
<div class="mt-3 small">
<pre class="bg-light p-3 rounded"><code>{{ metadata|json_encode(constant('JSON_PRETTY_PRINT')) }}</code></pre>
</div>
</details>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}