mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
...
This commit is contained in:
@@ -46,11 +46,6 @@ class AdultController extends Controller
|
||||
$video['poster_url'] = $metadata['cover_url'];
|
||||
}
|
||||
|
||||
// Add other local paths if needed
|
||||
if (!empty($metadata['local_screenshot_path'])) {
|
||||
$video['screenshot_url'] = $metadata['local_screenshot_path'];
|
||||
}
|
||||
|
||||
// Add actors data if available
|
||||
if (!empty($metadata['actors'])) {
|
||||
$video['actors'] = $metadata['actors'];
|
||||
@@ -106,7 +101,7 @@ class AdultController extends Controller
|
||||
// Decode metadata for display
|
||||
$metadata = json_decode($adultVideo['metadata'], true);
|
||||
|
||||
// Add local image paths to the video data for template compatibility
|
||||
// Add local image paths and other metadata to the video data for template compatibility
|
||||
if (!empty($metadata['local_cover_path'])) {
|
||||
$adultVideo['poster_url'] = '/public/images/'.$metadata['local_cover_path'];
|
||||
} elseif (!empty($metadata['cover_url'])) {
|
||||
@@ -117,10 +112,27 @@ class AdultController extends Controller
|
||||
$adultVideo['screenshot_url'] = '/public/images/'.$metadata['local_screenshot_path'];
|
||||
}
|
||||
|
||||
// Add actors data if available
|
||||
if (!empty($metadata['actors'])) {
|
||||
$adultVideo['actors'] = $metadata['actors'];
|
||||
}
|
||||
|
||||
// Get actors for this adult video from the pivot table
|
||||
$stmt = $this->pdo->prepare("
|
||||
SELECT a.*
|
||||
FROM actors a
|
||||
JOIN actor_adult_video aav ON a.id = aav.actor_id
|
||||
WHERE aav.adult_video_id = :adult_video_id
|
||||
ORDER BY a.name ASC
|
||||
");
|
||||
$stmt->execute(['adult_video_id' => $adultVideoId]);
|
||||
$actors = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
|
||||
return $this->view->render($response, 'adult/show.twig', [
|
||||
'title' => $adultVideo['title'],
|
||||
'movie' => $adultVideo, // Keep same variable name for template compatibility
|
||||
'metadata' => $metadata
|
||||
'metadata' => $metadata,
|
||||
'actors' => $actors
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user