mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
dont know ?
This commit is contained in:
@@ -1,383 +1,533 @@
|
||||
{% extends "layouts/app.twig" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container-fluid px-4 py-3">
|
||||
<!-- Back button -->
|
||||
<div class="mb-4">
|
||||
<a href="{{ path_for('tvshows.index') }}" class="btn btn-link text-decoration-none p-0">
|
||||
<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 TV Shows
|
||||
</a>
|
||||
</div>
|
||||
<!-- Hero Section with Backdrop -->
|
||||
<div class="relative">
|
||||
{% if tvshow.backdrop_url %}
|
||||
<div class="h-96 md:h-[500px] relative overflow-hidden">
|
||||
<img src="/images/{{ tvshow.backdrop_url }}" alt="{{ tvshow.title }} backdrop" class="w-full h-full object-cover">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-black via-black/50 to-transparent"></div>
|
||||
<div class="absolute inset-0 bg-gradient-to-r from-black/80 via-black/40 to-transparent"></div>
|
||||
|
||||
<div class="card shadow-sm">
|
||||
<div class="row g-0">
|
||||
<!-- TV Show poster -->
|
||||
<div class="col-md-4">
|
||||
<div class="card-body p-4">
|
||||
<div class="ratio ratio-2x3">
|
||||
<!-- Back button -->
|
||||
<div class="absolute top-4 left-4 z-10">
|
||||
<a href="{{ path_for('tvshows.index') }}" class="inline-flex items-center text-white hover:text-gray-300 transition-colors bg-black/20 backdrop-blur-sm rounded-full px-4 py-2">
|
||||
<svg class="mr-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 TV Shows
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Hero Content -->
|
||||
<div class="absolute bottom-0 left-0 right-0 p-6 md:p-8">
|
||||
<div class="max-w-4xl">
|
||||
<h1 class="text-4xl md:text-6xl font-bold text-white mb-2 drop-shadow-lg">{{ tvshow.title }}</h1>
|
||||
{% if tvshow.tagline %}
|
||||
<p class="text-xl md:text-2xl text-gray-200 mb-4 drop-shadow-md">{{ tvshow.tagline }}</p>
|
||||
{% endif %}
|
||||
|
||||
<!-- Quick Info -->
|
||||
<div class="flex flex-wrap gap-4 text-sm text-white mb-4">
|
||||
{% if tvshow.first_air_date %}
|
||||
<span class="flex items-center bg-black/30 backdrop-blur-sm rounded-full px-3 py-1">
|
||||
<svg class="mr-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="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>
|
||||
{{ tvshow.first_air_date|date('Y') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.last_air_date %}
|
||||
<span class="flex items-center bg-black/30 backdrop-blur-sm rounded-full px-3 py-1">
|
||||
<svg class="mr-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="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
Ended {{ tvshow.last_air_date|date('Y') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.vote_average %}
|
||||
<span class="flex items-center bg-black/30 backdrop-blur-sm rounded-full px-3 py-1">
|
||||
<svg class="mr-2" 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>
|
||||
{{ tvshow.vote_average }}/10
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.number_of_seasons and tvshow.number_of_episodes %}
|
||||
<span class="flex items-center bg-black/30 backdrop-blur-sm rounded-full px-3 py-1">
|
||||
<svg class="mr-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="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>
|
||||
{{ tvshow.number_of_seasons }} season{{ tvshow.number_of_seasons > 1 ? 's' : '' }}, {{ tvshow.number_of_episodes }} episode{{ tvshow.number_of_episodes > 1 ? 's' : '' }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<span class="flex items-center bg-black/30 backdrop-blur-sm rounded-full px-3 py-1">
|
||||
<svg class="mr-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="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>
|
||||
{{ tvshow.source_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Status badges -->
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
{% if tvshow.status == 'Ended' %}
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-red-500 text-white">
|
||||
<svg class="mr-2" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"/>
|
||||
</svg>
|
||||
Ended
|
||||
</span>
|
||||
{% elseif tvshow.status == 'Returning Series' %}
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-green-500 text-white">
|
||||
<svg class="mr-2" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
Ongoing
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.is_favorite %}
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-red-500 text-white">
|
||||
<svg class="mr-2" width="14" height="14" 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>
|
||||
|
||||
<!-- Action buttons -->
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<button class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg font-medium transition-colors flex items-center">
|
||||
<svg class="mr-2" width="18" height="18" 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="bg-white/10 hover:bg-white/20 backdrop-blur-sm text-white border border-white/30 px-6 py-3 rounded-lg font-medium transition-colors flex items-center">
|
||||
<svg class="mr-2" width="18" height="18" 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>
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- Fallback hero without backdrop -->
|
||||
<div class="bg-gradient-to-r from-blue-900 to-purple-900 h-64 relative">
|
||||
<div class="absolute top-4 left-4 z-10">
|
||||
<a href="{{ path_for('tvshows.index') }}" class="inline-flex items-center text-white hover:text-gray-300 transition-colors">
|
||||
<svg class="mr-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 TV Shows
|
||||
</a>
|
||||
</div>
|
||||
<div class="absolute bottom-0 left-0 right-0 p-6">
|
||||
<h1 class="text-4xl font-bold text-white mb-2">{{ tvshow.title }}</h1>
|
||||
{% if tvshow.tagline %}
|
||||
<p class="text-xl text-gray-200">{{ tvshow.tagline }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="max-w-7xl mx-auto px-4 py-8">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
<!-- Poster and Quick Actions -->
|
||||
<div class="lg:col-span-1">
|
||||
<div class="sticky top-4">
|
||||
<!-- Poster -->
|
||||
<div class="bg-white rounded-xl shadow-lg overflow-hidden mb-6">
|
||||
<div class="aspect-[2/3]">
|
||||
{% if tvshow.poster_url %}
|
||||
<img src="/images/{{ tvshow.poster_url }}" alt="{{ tvshow.title }}" class="img-fluid rounded">
|
||||
<img src="/images/{{ tvshow.poster_url }}" alt="{{ tvshow.title }}" class="w-full h-full object-cover">
|
||||
{% else %}
|
||||
<div class="w-100 h-100 d-flex align-items-center justify-content-center bg-light rounded">
|
||||
<svg class="text-muted" width="96" height="96" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<div class="w-full h-full flex items-center justify-center bg-gradient-to-br from-gray-100 to-gray-200">
|
||||
<svg class="text-gray-400 w-16 h-16" 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>
|
||||
|
||||
<!-- Action buttons -->
|
||||
<div class="mt-4 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>
|
||||
|
||||
<!-- TV Show details -->
|
||||
<div class="col-md-8">
|
||||
<div class="card-body p-4">
|
||||
<div class="mb-4">
|
||||
<h1 class="display-4 fw-bold text-dark mb-2">{{ tvshow.title }}</h1>
|
||||
{% if tvshow.tagline %}
|
||||
<p class="lead text-muted mb-3">{{ tvshow.tagline }}</p>
|
||||
{% endif %}
|
||||
|
||||
<!-- TV Show metadata -->
|
||||
<div class="d-flex flex-wrap gap-3 small text-muted mb-3">
|
||||
{% if tvshow.first_air_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>
|
||||
{{ tvshow.first_air_date|date('Y') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.last_air_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="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
||||
</svg>
|
||||
Ended {{ tvshow.last_air_date|date('Y') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.vote_average %}
|
||||
<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>
|
||||
{{ tvshow.vote_average }}/10
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.number_of_seasons and tvshow.number_of_episodes %}
|
||||
<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>
|
||||
{{ tvshow.number_of_seasons }} season{{ tvshow.number_of_seasons > 1 ? 's' : '' }}, {{ tvshow.number_of_episodes }} episode{{ tvshow.number_of_episodes > 1 ? 's' : '' }}
|
||||
</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>
|
||||
{{ tvshow.source_name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Status badges -->
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
{% if tvshow.status == 'Ended' %}
|
||||
<span class="badge bg-danger 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="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"/>
|
||||
</svg>
|
||||
Ended
|
||||
</span>
|
||||
{% elseif tvshow.status == 'Returning Series' %}
|
||||
<span class="badge bg-success 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="M13 10V3L4 14h7v7l9-11h-7z"/>
|
||||
</svg>
|
||||
Ongoing
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.is_favorite %}
|
||||
<span class="badge bg-warning text-dark 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 tvshow.overview %}
|
||||
<div class="mb-4">
|
||||
<h2 class="h5 fw-semibold text-dark mb-2">Overview</h2>
|
||||
<p class="text-muted">{{ tvshow.overview }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- 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 tvshow.created_by %}
|
||||
<div class="col-md-6">
|
||||
<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">Created by</small>
|
||||
<span class="fw-medium">{{ tvshow.created_by }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if actors %}
|
||||
<div class="mt-3">
|
||||
<small class="text-muted d-block mb-2">Main Cast</small>
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
{% for actor in actors %}
|
||||
<span class="badge bg-light text-dark">{{ actor.name }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<!-- Quick Stats -->
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Quick Stats</h3>
|
||||
<div class="space-y-3">
|
||||
{% if tvshow.vote_count %}
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-gray-600">Votes</span>
|
||||
<span class="font-medium">{{ tvshow.vote_count|number_format }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- TV Show Details Grid -->
|
||||
<div class="row g-4 mb-4">
|
||||
<!-- Genres -->
|
||||
{% if tvshow.genre %}
|
||||
<div class="col-md-4">
|
||||
<h3 class="h6 fw-semibold text-dark mb-3">Genres</h3>
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
{% for genre in tvshow.genre|split(',') %}
|
||||
<span class="badge bg-primary">{{ genre|trim }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if tvshow.number_of_seasons %}
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-gray-600">Seasons</span>
|
||||
<span class="font-medium">{{ tvshow.number_of_seasons }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Networks & Production -->
|
||||
{% if tvshow.networks or tvshow.production_companies %}
|
||||
<div class="col-md-4">
|
||||
<h3 class="h6 fw-semibold text-dark mb-3">Production</h3>
|
||||
<div class="mb-2">
|
||||
{% if tvshow.networks %}
|
||||
<small class="text-muted d-block">Networks</small>
|
||||
<span class="fw-medium">{{ tvshow.networks }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if tvshow.production_companies %}
|
||||
<div class="mb-2">
|
||||
<small class="text-muted d-block">Companies</small>
|
||||
<span class="fw-medium">{{ tvshow.production_companies }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tvshow.number_of_episodes %}
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-gray-600">Episodes</span>
|
||||
<span class="font-medium">{{ tvshow.number_of_episodes }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Episode Details -->
|
||||
{% if tvshow.episode_run_time or tvshow.origin_country %}
|
||||
<div class="col-md-4">
|
||||
<h3 class="h6 fw-semibold text-dark mb-3">Details</h3>
|
||||
<div class="mb-2">
|
||||
{% if tvshow.episode_run_time %}
|
||||
<small class="text-muted d-block">Episode Runtime</small>
|
||||
<span class="fw-medium">{{ tvshow.episode_run_time }} minutes</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if tvshow.origin_country %}
|
||||
<div class="mb-2">
|
||||
<small class="text-muted d-block">Origin Country</small>
|
||||
<span class="fw-medium">{{ tvshow.origin_country }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tvshow.original_language %}
|
||||
<div class="mb-2">
|
||||
<small class="text-muted d-block">Language</small>
|
||||
<span class="fw-medium">{{ tvshow.original_language|upper }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Seasons Section -->
|
||||
{% if seasons %}
|
||||
<div class="mb-4">
|
||||
<h3 class="h5 fw-semibold text-dark mb-3">Seasons</h3>
|
||||
<div class="accordion" id="seasonsAccordion">
|
||||
{% for season in seasons %}
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading{{ season.season_number }}">
|
||||
<button class="accordion-button {% if loop.first %}collapsed{% else %}collapsed{% endif %}" type="button" data-bs-toggle="collapse" data-bs-target="#collapse{{ season.season_number }}" aria-expanded="{% if loop.first %}true{% else %}false{% endif %}" aria-controls="collapse{{ season.season_number }}">
|
||||
<div class="d-flex justify-content-between w-100">
|
||||
<span>Season {{ season.season_number }}</span>
|
||||
<span class="text-muted">{{ season.episode_count }} episodes</span>
|
||||
</div>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapse{{ season.season_number }}" class="accordion-collapse collapse {% if loop.first %}show{% endif %}" aria-labelledby="heading{{ season.season_number }}" data-bs-parent="#seasonsAccordion">
|
||||
<div class="accordion-body">
|
||||
{% if season.episodes %}
|
||||
<div class="list-group list-group-flush">
|
||||
{% for episode in season.episodes %}
|
||||
<div class="list-group-item d-flex align-items-center py-3">
|
||||
<div class="flex-shrink-0 me-3">
|
||||
{% if episode.poster_url %}
|
||||
<img src="/images/{{ episode.poster_url }}" alt="{{ episode.title }}" class="rounded" style="width: 60px; height: 34px; object-fit: cover;">
|
||||
{% else %}
|
||||
<div class="rounded d-flex align-items-center justify-content-center bg-light" style="width: 60px; height: 34px;">
|
||||
<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="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 class="flex-grow-1">
|
||||
<div class="d-flex align-items-center gap-2 mb-1">
|
||||
<span class="badge bg-info">E{{ episode.episode_number }}</span>
|
||||
{% if episode.air_date %}
|
||||
<span class="small text-muted">{{ episode.air_date|date('M j, Y') }}</span>
|
||||
{% endif %}
|
||||
{% if episode.is_watched %}
|
||||
<span class="badge bg-success">Watched</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h6 class="mb-1">{{ episode.title }}</h6>
|
||||
{% if episode.overview %}
|
||||
<p class="small text-muted mb-0">{{ episode.overview|slice(0, 100) }}{% if episode.overview|length > 100 %}...{% endif %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-muted">No episodes available.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-gray-600">Source</span>
|
||||
<span class="font-medium">{{ tvshow.source_name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Recent Episodes -->
|
||||
{% if recent_episodes %}
|
||||
<div class="mb-4">
|
||||
<h3 class="h5 fw-semibold text-dark mb-3">Recent Episodes</h3>
|
||||
<div class="vstack gap-3">
|
||||
{% for episode in recent_episodes[:5] %}
|
||||
<div class="card border-0 bg-light">
|
||||
<div class="card-body p-3">
|
||||
<div class="d-flex">
|
||||
<div class="flex-shrink-0 me-3">
|
||||
{% if episode.still_url %}
|
||||
<img src="/images/{{ episode.still_url }}" alt="{{ episode.title }}" class="rounded" style="width: 120px; height: 68px; object-fit: cover;">
|
||||
{% else %}
|
||||
<div class="rounded d-flex align-items-center justify-content-center bg-secondary" style="width: 120px; height: 68px;">
|
||||
<svg class="text-white" width="32" height="32" 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 class="flex-grow-1">
|
||||
<div class="d-flex align-items-center gap-2 mb-1">
|
||||
<span class="badge bg-info">S{{ episode.season_number }}E{{ episode.episode_number }}</span>
|
||||
<span class="small text-muted">{{ episode.air_date|date('M j, Y') }}</span>
|
||||
</div>
|
||||
<h6 class="fw-medium mb-1">{{ episode.title }}</h6>
|
||||
{% if episode.vote_average %}
|
||||
<div class="d-flex align-items-center small text-muted">
|
||||
<svg class="me-1 text-warning" width="14" height="14" 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>
|
||||
{{ episode.vote_average }}/10
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Streaming & Availability -->
|
||||
{% if tvshow.streaming_providers or tvshow.availability %}
|
||||
<div class="mb-4">
|
||||
<h3 class="h5 fw-semibold text-dark mb-3">Where to Watch</h3>
|
||||
<div class="row g-3">
|
||||
{% if tvshow.streaming_providers %}
|
||||
<div class="col-md-6">
|
||||
<small class="text-muted d-block mb-2">Streaming</small>
|
||||
<div class="d-flex flex-wrap gap-2">
|
||||
{% for provider in tvshow.streaming_providers %}
|
||||
<span class="badge bg-success">{{ provider }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.availability %}
|
||||
<div class="col-md-6">
|
||||
<small class="text-muted d-block mb-2">Availability</small>
|
||||
<span class="fw-medium">{{ tvshow.availability }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- 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 & Metadata
|
||||
</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>
|
||||
|
||||
<!-- Main Details -->
|
||||
<div class="lg:col-span-2 space-y-8">
|
||||
<!-- Overview -->
|
||||
{% if tvshow.overview %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h2 class="text-2xl font-bold text-gray-900 mb-4">Overview</h2>
|
||||
<p class="text-gray-700 leading-relaxed">{{ tvshow.overview }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Cast & Crew -->
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h2 class="text-2xl font-bold text-gray-900 mb-6">Cast & Crew</h2>
|
||||
|
||||
<!-- Creator -->
|
||||
{% if tvshow.created_by %}
|
||||
<div class="flex items-start mb-6">
|
||||
<div class="bg-blue-100 rounded-full p-3 mr-4">
|
||||
<svg class="text-blue-600" 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>
|
||||
<div>
|
||||
<h3 class="font-semibold text-gray-900">Created by</h3>
|
||||
<p class="text-gray-600">{{ tvshow.created_by }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Cast -->
|
||||
{% if actors %}
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Cast</h3>
|
||||
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
||||
{% for actor in actors %}
|
||||
<a href="{{ path_for('actors.show', {'id': actor.id}) }}" class="flex flex-col items-center text-center group hover:scale-105 transition-transform">
|
||||
<div class="w-16 h-16 md:w-20 md:h-20 bg-gray-200 rounded-full overflow-hidden mb-2 group-hover:ring-2 group-hover:ring-blue-300 transition-all">
|
||||
{% if actor.thumbnail_path %}
|
||||
<img src="/images/{{ actor.thumbnail_path }}" alt="{{ actor.name }}" class="w-full h-full object-cover">
|
||||
{% else %}
|
||||
<div class="w-full h-full bg-gradient-to-br from-blue-400 to-purple-500 flex items-center justify-center">
|
||||
<span class="text-white font-bold text-lg">{{ actor.name|first|upper }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<p class="font-medium text-gray-900 text-sm leading-tight group-hover:text-blue-600 transition-colors">{{ actor.name }}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Details Grid -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<!-- Genres -->
|
||||
{% if tvshow.genre %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Genres</h3>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for genre in tvshow.genre|split(',') %}
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-100 text-blue-800">{{ genre|trim }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Production -->
|
||||
{% if tvshow.networks or tvshow.production_companies %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Production</h3>
|
||||
{% if tvshow.networks %}
|
||||
<div class="mb-3">
|
||||
<p class="text-sm text-gray-600 mb-1">Networks</p>
|
||||
<p class="font-medium">{{ tvshow.networks }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tvshow.production_companies %}
|
||||
<div>
|
||||
<p class="text-sm text-gray-600 mb-1">Companies</p>
|
||||
<p class="font-medium">{{ tvshow.production_companies }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Technical Details -->
|
||||
{% if tvshow.episode_run_time or tvshow.origin_country or tvshow.original_language %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Technical</h3>
|
||||
{% if tvshow.episode_run_time %}
|
||||
<div class="mb-3">
|
||||
<p class="text-sm text-gray-600 mb-1">Episode Runtime</p>
|
||||
<p class="font-medium">{{ tvshow.episode_run_time }} minutes</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tvshow.origin_country %}
|
||||
<div class="mb-3">
|
||||
<p class="text-sm text-gray-600 mb-1">Origin Country</p>
|
||||
<p class="font-medium">{{ tvshow.origin_country }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if tvshow.original_language %}
|
||||
<div>
|
||||
<p class="text-sm text-gray-600 mb-1">Language</p>
|
||||
<p class="font-medium">{{ tvshow.original_language|upper }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Seasons & Episodes -->
|
||||
{% if seasons %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h2 class="text-2xl font-bold text-gray-900 mb-6">Seasons & Episodes</h2>
|
||||
<div class="space-y-4">
|
||||
{% for season in seasons %}
|
||||
<div class="border border-gray-200 rounded-lg overflow-hidden">
|
||||
<button class="w-full px-6 py-4 bg-gray-50 hover:bg-gray-100 transition-colors text-left flex items-center justify-between focus:outline-none focus:ring-2 focus:ring-blue-500">
|
||||
<div class="flex items-center">
|
||||
<svg class="w-5 h-5 text-gray-600 mr-3" 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>
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-gray-900">Season {{ season.season_number }}</h3>
|
||||
<p class="text-sm text-gray-600">{{ season.episode_count }} episodes</p>
|
||||
</div>
|
||||
</div>
|
||||
<svg class="w-5 h-5 text-gray-400 transform transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="hidden px-6 py-4 bg-white border-t border-gray-100">
|
||||
{% if season.episodes %}
|
||||
<div class="space-y-3">
|
||||
{% for episode in season.episodes %}
|
||||
<div class="flex items-start p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors">
|
||||
<div class="flex-shrink-0 mr-4">
|
||||
{% if episode.still_url %}
|
||||
<img src="/images/{{ episode.still_url }}" alt="{{ episode.title }}" class="w-20 h-12 object-cover rounded">
|
||||
{% else %}
|
||||
<div class="w-20 h-12 bg-gray-200 rounded flex items-center justify-center">
|
||||
<svg class="w-6 h-6 text-gray-400" 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 class="flex-grow">
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800">E{{ episode.episode_number }}</span>
|
||||
{% if episode.air_date %}
|
||||
<span class="text-sm text-gray-600">{{ episode.air_date|date('M j, Y') }}</span>
|
||||
{% endif %}
|
||||
{% if episode.is_watched %}
|
||||
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800">Watched</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h4 class="text-sm font-semibold text-gray-900 mb-1">{{ episode.title }}</h4>
|
||||
{% if episode.overview %}
|
||||
<p class="text-sm text-gray-700 mb-2">{{ episode.overview|slice(0, 120) }}{% if episode.overview|length > 120 %}...{% endif %}</p>
|
||||
{% endif %}
|
||||
{% if episode.actors %}
|
||||
<div class="flex flex-wrap gap-1">
|
||||
{% for actor in episode.actors %}
|
||||
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800">
|
||||
{{ actor.name }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="text-gray-600">No episodes available.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Recent Episodes -->
|
||||
{% if recent_episodes %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h2 class="text-2xl font-bold text-gray-900 mb-6">Recent Episodes</h2>
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
{% for episode in recent_episodes[:5] %}
|
||||
<div class="flex items-start p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors">
|
||||
<div class="flex-shrink-0 mr-4">
|
||||
{% if episode.still_url %}
|
||||
<img src="/images/{{ episode.still_url }}" alt="{{ episode.title }}" class="w-24 h-14 object-cover rounded">
|
||||
{% else %}
|
||||
<div class="w-24 h-14 bg-gray-200 rounded flex items-center justify-center">
|
||||
<svg class="w-8 h-8 text-gray-400" 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 class="flex-grow">
|
||||
<div class="flex items-center gap-2 mb-1">
|
||||
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800">S{{ episode.season_number }}E{{ episode.episode_number }}</span>
|
||||
<span class="text-sm text-gray-600">{{ episode.air_date|date('M j, Y') }}</span>
|
||||
</div>
|
||||
<h4 class="text-sm font-semibold text-gray-900 mb-1">{{ episode.title }}</h4>
|
||||
{% if episode.actors %}
|
||||
<div class="flex flex-wrap gap-1 mb-2">
|
||||
{% for actor in episode.actors %}
|
||||
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800">
|
||||
{{ actor.name }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if episode.vote_average %}
|
||||
<div class="flex items-center text-sm text-gray-600">
|
||||
<svg class="w-4 h-4 text-yellow-500 mr-1" 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>
|
||||
{{ episode.vote_average }}/10
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Where to Watch -->
|
||||
{% if tvshow.streaming_providers or tvshow.availability %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h2 class="text-2xl font-bold text-gray-900 mb-6">Where to Watch</h2>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{% if tvshow.streaming_providers %}
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Streaming</h3>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for provider in tvshow.streaming_providers %}
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-green-100 text-green-800">{{ provider }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if tvshow.availability %}
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-4">Availability</h3>
|
||||
<p class="text-gray-700">{{ tvshow.availability }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Technical Details & Metadata -->
|
||||
{% if metadata %}
|
||||
<div class="space-y-6">
|
||||
<h2 class="text-2xl font-bold text-gray-900">Technical Details & Metadata</h2>
|
||||
|
||||
<!-- Jellyfin ID -->
|
||||
{% if metadata.jellyfin_id %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-3 flex items-center">
|
||||
<svg class="mr-2 text-blue-600" width="20" height="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"/>
|
||||
</svg>
|
||||
Jellyfin ID
|
||||
</h3>
|
||||
<div class="bg-gray-50 rounded-lg p-3">
|
||||
<code class="text-sm text-gray-800 font-mono">{{ metadata.jellyfin_id }}</code>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Genres -->
|
||||
{% if metadata.genres %}
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<h3 class="text-lg font-semibold text-gray-900 mb-3 flex items-center">
|
||||
<svg class="mr-2 text-green-600" width="20" height="20" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"/>
|
||||
</svg>
|
||||
Genres
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% for genre in metadata.genres %}
|
||||
<span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-green-100 text-green-800">{{ genre }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Raw Metadata (Collapsible) -->
|
||||
<div class="bg-white rounded-xl shadow-lg p-6">
|
||||
<details class="group">
|
||||
<summary class="cursor-pointer flex items-center text-gray-700 hover:text-gray-900 transition-colors">
|
||||
<svg class="mr-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>
|
||||
<span class="font-medium">Full Raw Metadata</span>
|
||||
</summary>
|
||||
<div class="mt-4 bg-gray-50 rounded-lg p-4 overflow-x-auto">
|
||||
<pre class="text-xs text-gray-800 whitespace-pre-wrap"><code>{{ metadata|json_encode(constant('JSON_PRETTY_PRINT')) }}</code></pre>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Season accordion functionality
|
||||
const seasonButtons = document.querySelectorAll('.border-gray-200.rounded-lg.overflow-hidden button');
|
||||
|
||||
seasonButtons.forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
const content = this.nextElementSibling;
|
||||
const icon = this.querySelector('svg:last-child');
|
||||
|
||||
if (content.classList.contains('hidden')) {
|
||||
content.classList.remove('hidden');
|
||||
icon.style.transform = 'rotate(180deg)';
|
||||
} else {
|
||||
content.classList.add('hidden');
|
||||
icon.style.transform = 'rotate(0deg)';
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user