Actualiser api.php
This commit is contained in:
@@ -322,10 +322,11 @@ switch ($action) {
|
||||
$result['format'] = $upcData['format'];
|
||||
}
|
||||
|
||||
// 🔥 NOUVEAU : DVDFr pour remplacer l'affiche lors d'un ajout manuel
|
||||
$dvdfrCover = fetchDVDFr($ean, $pdo);
|
||||
if (!empty($dvdfrCover)) {
|
||||
$result['poster'] = $dvdfrCover;
|
||||
// 🔥 NOUVEAU : DVDFr pour remplacer l'affiche ET le synopsis lors d'un ajout manuel
|
||||
$dvdfrData = fetchDVDFr($ean, $pdo);
|
||||
if (!empty($dvdfrData)) {
|
||||
if (!empty($dvdfrData['poster'])) $result['poster'] = $dvdfrData['poster'];
|
||||
if (!empty($dvdfrData['synopsis'])) $result['description'] = $dvdfrData['synopsis'];
|
||||
}
|
||||
$tmdbKey = getTmdbApiKey($pdo);
|
||||
if ($tmdbKey && $tmdbQueryTitle) {
|
||||
@@ -442,10 +443,15 @@ switch ($action) {
|
||||
if (empty($format) || $format === 'Blu-ray') $format = $upcData['format'];
|
||||
}
|
||||
|
||||
// 🔥 NOUVEAU : 1.5 DVDFr (Écrase l'affiche UPC avec la vraie jaquette FR)
|
||||
$dvdfrCover = fetchDVDFr($ean, $pdo);
|
||||
if (!empty($dvdfrCover)) {
|
||||
$poster = $dvdfrCover;
|
||||
// 🔥 NOUVEAU : 1.5 DVDFr (Jaquette FR et Synopsis)
|
||||
$dvdfrData = fetchDVDFr($ean, $pdo);
|
||||
if (!empty($dvdfrData)) {
|
||||
if (!empty($dvdfrData['poster'])) {
|
||||
$poster = $dvdfrData['poster'];
|
||||
}
|
||||
if (!empty($dvdfrData['synopsis'])) {
|
||||
$description = $dvdfrData['synopsis']; // Injecte le résumé du DVD/Coffret
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -468,8 +474,8 @@ switch ($action) {
|
||||
// 👇 LIGNE DÉSACTIVÉE ICI UNIQUEMENT POUR LA VIDÉOTHÈQUE 👇
|
||||
// if (empty($poster) && !empty($tmdbData['poster'])) $poster = $tmdbData['poster'];
|
||||
|
||||
// 🔥 Récupération du Synopsis officiel
|
||||
if (!empty($tmdbData['overview'])) {
|
||||
// 🔥 Récupération du Synopsis officiel (Seulement si DVDFr n'a rien trouvé)
|
||||
if (empty($description) && !empty($tmdbData['overview'])) {
|
||||
$description = $tmdbData['overview'];
|
||||
}
|
||||
// 🔥 Récupération des Acteurs officiels (Top 4)
|
||||
|
||||
Reference in New Issue
Block a user