i dont know

This commit is contained in:
Lars Behrends
2025-10-20 23:40:55 +02:00
parent 552bb72370
commit 73d8441787
33 changed files with 3079 additions and 69 deletions

View File

@@ -78,6 +78,28 @@ class ActorController extends Controller
$stmt->execute(['actor_id' => $actorId]);
$tvShows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($scenes as &$scene) {
if (!empty($scene['metadata'])) {
$metadata = json_decode($scene['metadata'], true);
// Use local cover path if available, otherwise fall back to original URL
if (!empty($metadata['local_cover_path'])) {
$scene['poster_url'] = $metadata['local_cover_path'];
} elseif (!empty($metadata['cover_url'])) {
$scene['poster_url'] = $metadata['cover_url'];
}
// Add actors data if available
if (!empty($metadata['actors'])) {
$scene['actors'] = $metadata['actors'];
}
}
}
return $this->view->render($response, 'actor/show.twig', [
'title' => $actor['name'],
'actor' => $actor,
@@ -86,7 +108,6 @@ class ActorController extends Controller
'tv_shows' => $tvShows
]);
}
public function index(Request $request, Response $response, $args)
{
// Get all actors with their media counts from all types