Actualiser api.php
This commit is contained in:
@@ -419,7 +419,9 @@ switch ($action) {
|
|||||||
|
|
||||||
if (empty($year) && !empty($tmdbData['year'])) $year = $tmdbData['year'];
|
if (empty($year) && !empty($tmdbData['year'])) $year = $tmdbData['year'];
|
||||||
if (empty($length) && !empty($tmdbData['length'])) $length = $tmdbData['length'];
|
if (empty($length) && !empty($tmdbData['length'])) $length = $tmdbData['length'];
|
||||||
if (empty($poster) && !empty($tmdbData['poster'])) $poster = $tmdbData['poster'];
|
|
||||||
|
// 👇 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
|
// 🔥 Récupération du Synopsis officiel
|
||||||
if (!empty($tmdbData['overview'])) {
|
if (!empty($tmdbData['overview'])) {
|
||||||
@@ -431,7 +433,6 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // <--- ✅ Fermeture correcte de if ($tmdbApiKey)
|
} // <--- ✅ Fermeture correcte de if ($tmdbApiKey)
|
||||||
|
|
||||||
// 🔥 L'INSERT SQL DOIT ÊTRE ICI (EN DEHORS DU IF TMDB)
|
// 🔥 L'INSERT SQL DOIT ÊTRE ICI (EN DEHORS DU IF TMDB)
|
||||||
$sql = "INSERT INTO videotheque (id, title, year, director, poster, format, length, publisher, ean_isbn13, number_of_discs, aspect_ratio, description, actors) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE director=IF(VALUES(director)!='',VALUES(director),director), poster=IF(VALUES(poster)!='',VALUES(poster),poster), format=IF(VALUES(format)!='',VALUES(format),format), length=IF(VALUES(length)!='',VALUES(length),length), publisher=IF(VALUES(publisher)!='',VALUES(publisher),publisher), ean_isbn13=IF(VALUES(ean_isbn13)!='',VALUES(ean_isbn13),ean_isbn13), number_of_discs=IF(VALUES(number_of_discs)!=1,VALUES(number_of_discs),number_of_discs), aspect_ratio=IF(VALUES(aspect_ratio)!='',VALUES(aspect_ratio),aspect_ratio), description=IF(VALUES(description)!='',VALUES(description),description), actors=IF(VALUES(actors)!='',VALUES(actors),actors)";
|
$sql = "INSERT INTO videotheque (id, title, year, director, poster, format, length, publisher, ean_isbn13, number_of_discs, aspect_ratio, description, actors) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE director=IF(VALUES(director)!='',VALUES(director),director), poster=IF(VALUES(poster)!='',VALUES(poster),poster), format=IF(VALUES(format)!='',VALUES(format),format), length=IF(VALUES(length)!='',VALUES(length),length), publisher=IF(VALUES(publisher)!='',VALUES(publisher),publisher), ean_isbn13=IF(VALUES(ean_isbn13)!='',VALUES(ean_isbn13),ean_isbn13), number_of_discs=IF(VALUES(number_of_discs)!=1,VALUES(number_of_discs),number_of_discs), aspect_ratio=IF(VALUES(aspect_ratio)!='',VALUES(aspect_ratio),aspect_ratio), description=IF(VALUES(description)!='',VALUES(description),description), actors=IF(VALUES(actors)!='',VALUES(actors),actors)";
|
||||||
$stmt = $pdo->prepare($sql);
|
$stmt = $pdo->prepare($sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user