impoort stuff!

This commit is contained in:
Lars Behrends
2025-10-24 16:04:34 +02:00
parent 73d8441787
commit 218d0c28c0
17 changed files with 3043 additions and 277 deletions

View File

@@ -19,7 +19,7 @@
<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;">
<img src="/images/{{ 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">
@@ -28,6 +28,22 @@
</div>
{% endif %}
</div>
<!-- Action buttons -->
<div class="mt-3 d-grid gap-2">
<button class="btn btn-primary">
<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="M14.828 14.828a4 4 0 01-5.656 0M9 10h1m4 0h1m-6 8a9 9 0 110-18 9 9 0 010 18z"/>
</svg>
Mark as Watched
</button>
<button class="btn btn-outline-danger">
<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="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/>
</svg>
Add to Favorites
</button>
</div>
</div>
</div>
@@ -36,6 +52,9 @@
<div class="card-body">
<div class="mb-4">
<h1 class="display-5 fw-bold text-dark mb-2">{{ movie.title }}</h1>
{% if movie.tagline %}
<p class="lead text-muted mb-3">{{ movie.tagline }}</p>
{% endif %}
<!-- Video metadata -->
<div class="d-flex flex-wrap gap-3 small text-muted mb-3">
@@ -66,6 +85,15 @@
</span>
{% endif %}
{% if movie.file_size %}
<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="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>
{{ movie.file_size|filesizeformat }}
</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"/>
@@ -97,6 +125,15 @@
Favorite
</span>
{% endif %}
{% if movie.collection %}
<span class="badge bg-info d-flex align-items-center">
<svg class="me-1" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"/>
</svg>
{{ movie.collection }}
</span>
{% endif %}
</div>
</div>
@@ -108,82 +145,209 @@
</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>
<!-- Cast & Crew Section -->
<div class="mb-4">
<h2 class="h5 fw-semibold text-dark mb-3">Cast & Crew</h2>
<div class="row g-3">
{% if movie.director %}
<div class="col-md-4">
<div class="d-flex align-items-center">
<svg class="me-2 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>
<small class="text-muted d-block">Director</small>
<span class="fw-medium">{{ movie.director }}</span>
</div>
</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>
</div>
{% endif %}
<!-- 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>
{% if movie.cast %}
<div class="col-md-8">
<div class="d-flex align-items-center">
<svg class="me-2 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="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>
<div>
<small class="text-muted d-block">Cast</small>
<div class="d-flex flex-wrap gap-1">
{% for actor in movie.cast|split(',') %}
<span class="badge bg-light text-dark">{{ actor|trim }}</span>
{% endfor %}
</div>
</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
<!-- Performers with thumbnails -->
{% if movie.actors %}
<div class="mb-4">
<h3 class="h6 fw-semibold text-dark mb-3">Performers</h3>
<div class="d-flex flex-wrap gap-3">
{% 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: 80px;">
{% if actor.thumbnail_path %}
<img src="/images/{{ actor.thumbnail_path }}" alt="{{ actor.name }}" class="rounded-circle mb-2" style="width: 50px; height: 50px; object-fit: cover;">
{% else %}
<div class="rounded-circle bg-light d-flex align-items-center justify-content-center mb-2" style="width: 50px; height: 50px;">
<svg class="text-muted" width="24" height="24" 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 %}
<!-- Video Details Grid -->
<div class="row g-3 mb-4">
<!-- Genres & Categories -->
{% if movie.genre or movie.categories %}
<div class="col-md-6">
<h3 class="h6 fw-semibold text-dark mb-3">Categories</h3>
<div class="d-flex flex-wrap gap-2">
{% if movie.genre %}
{% for genre in movie.genre|split(',') %}
<span class="badge bg-primary">{{ genre|trim }}</span>
{% endfor %}
{% endif %}
{% if movie.categories %}
{% for category in movie.categories|split(',') %}
<span class="badge bg-secondary">{{ category|trim }}</span>
{% endfor %}
{% endif %}
</div>
</div>
{% endif %}
<!-- Genres & Studios -->
{% if movie.genre or metadata.studios %}
<!-- Technical Details -->
{% if movie.video_codec or movie.audio_codec or movie.resolution or movie.bitrate %}
<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>
<h3 class="h6 fw-semibold text-dark mb-3">Technical Details</h3>
<div class="row g-2">
{% if movie.video_codec %}
<div class="col-6">
<small class="text-muted d-block">Video Codec</small>
<span class="fw-medium">{{ movie.video_codec }}</span>
</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>
{% if movie.audio_codec %}
<div class="col-6">
<small class="text-muted d-block">Audio Codec</small>
<span class="fw-medium">{{ movie.audio_codec }}</span>
</div>
{% endif %}
</dl>
{% if movie.resolution %}
<div class="col-6">
<small class="text-muted d-block">Resolution</small>
<span class="fw-medium">{{ movie.resolution }}</span>
</div>
{% endif %}
{% if movie.bitrate %}
<div class="col-6">
<small class="text-muted d-block">Bitrate</small>
<span class="fw-medium">{{ movie.bitrate }} kbps</span>
</div>
{% endif %}
{% if movie.frame_rate %}
<div class="col-6">
<small class="text-muted d-block">Frame Rate</small>
<span class="fw-medium">{{ movie.frame_rate }} fps</span>
</div>
{% endif %}
{% if movie.aspect_ratio %}
<div class="col-6">
<small class="text-muted d-block">Aspect Ratio</small>
<span class="fw-medium">{{ movie.aspect_ratio }}</span>
</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
<!-- Studio & Production -->
{% if movie.studio or movie.production_companies %}
<div class="mb-4">
<h3 class="h6 fw-semibold text-dark mb-3">Production</h3>
<div class="row g-3">
{% if movie.studio %}
<div class="col-md-6">
<small class="text-muted d-block">Studio</small>
<span class="fw-medium">{{ movie.studio }}</span>
</div>
{% endif %}
{% if movie.production_companies %}
<div class="col-md-6">
<small class="text-muted d-block">Production Company</small>
<span class="fw-medium">{{ movie.production_companies }}</span>
</div>
{% endif %}
</div>
</div>
{% endif %}
<!-- File Information -->
{% if movie.file_path or movie.duration or movie.created_at %}
<div class="mb-4">
<h3 class="h6 fw-semibold text-dark mb-3">File Information</h3>
<div class="row g-3">
{% if movie.file_path %}
<div class="col-md-6">
<small class="text-muted d-block">File Path</small>
<span class="fw-medium small" style="word-break: break-all;">{{ movie.file_path }}</span>
</div>
{% endif %}
{% if movie.duration %}
<div class="col-md-3">
<small class="text-muted d-block">Duration</small>
<span class="fw-medium">{{ movie.duration }}</span>
</div>
{% endif %}
{% if movie.created_at %}
<div class="col-md-3">
<small class="text-muted d-block">Added</small>
<span class="fw-medium">{{ movie.created_at|date('M j, Y') }}</span>
</div>
{% endif %}
</div>
</div>
{% endif %}
<!-- Streaming & Availability -->
{% if movie.streaming_providers or movie.availability %}
<div class="mb-4">
<h3 class="h6 fw-semibold text-dark mb-3">Availability</h3>
<div class="row g-3">
{% if movie.streaming_providers %}
<div class="col-md-6">
<small class="text-muted d-block">Streaming Platforms</small>
<div class="d-flex flex-wrap gap-2">
{% for provider in movie.streaming_providers %}
<span class="badge bg-success">{{ provider }}</span>
{% endfor %}
</div>
</div>
{% endif %}
{% if movie.availability %}
<div class="col-md-6">
<small class="text-muted d-block">Availability Status</small>
<span class="fw-medium">{{ movie.availability }}</span>
</div>
{% endif %}
</div>
</div>
{% endif %}
<!-- Metadata (for debugging/advanced users) -->
{% if metadata %}
<div class="mt-4 pt-4 border-top">
@@ -192,7 +356,7 @@
<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
Technical Details & Metadata
</summary>
<div class="mt-3 small">
<pre class="bg-light p-3 rounded"><code>{{ metadata|json_encode(constant('JSON_PRETTY_PRINT')) }}</code></pre>