Actualiser api.php
This commit is contained in:
@@ -329,7 +329,16 @@ switch ($action) {
|
||||
// 🌟 Conservation de la précision Letterboxd (2.5, 3.5, etc.)
|
||||
$rating = isset($rowData['Rating']) && $rowData['Rating'] !== '' ? (float)$rowData['Rating'] : 3.0;
|
||||
$review = $rowData['Review'] ?? $rowData['review'] ?? '';
|
||||
$streaming = $rowData['Streaming'] ?? $rowData['streaming'] ?? 'Disponible en support physique ou Cinéma';
|
||||
$csvStreaming = $rowData['Streaming'] ?? $rowData['streaming'] ?? '';
|
||||
|
||||
// Si le CSV ne fournit pas l'info, on utilise celle de TMDB ou le message par défaut
|
||||
if (!empty($csvStreaming)) {
|
||||
$streaming = $csvStreaming;
|
||||
} elseif (!empty($tmdbData['streaming'])) {
|
||||
$streaming = $tmdbData['streaming'];
|
||||
} else {
|
||||
$streaming = 'Disponible en support physique ou Cinéma';
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO critiques (id, title, year, director, poster, rating, review, streaming)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
|
||||
Reference in New Issue
Block a user