Actualiser api.php

This commit is contained in:
2026-06-30 17:07:03 +02:00
parent 00d0b8d87b
commit 4acf2b5f60
+5 -2
View File
@@ -118,6 +118,10 @@ function emptyPhysicalResult() {
];
}
function makeStableId($type, $title, $year) {
return (abs(crc32(strtolower(trim($type ?? '')) . '|' . strtolower(trim($title ?? '')) . '|' . trim($year ?? ''))) % 2000000000) + 100000000;
}
// ── FONCTIONS API PHYSIQUE (UPCitemdb → UPCMDB fallback) ──
function throttleUpcLookup() {
static $last = 0;
@@ -516,8 +520,7 @@ function fetchFromBlurayCom($ean) {
return $empty;
}
// ── FONCTION POUR RÉCUPÉRER LES DONNÉES DEPUIS MOVIECOVERS.COM ──
function fetchFromMovieCovers($title) {
function fetchFromMovieCovers($title, $year = '') {
$empty = [
'title' => '', 'year' => '', 'director' => '', 'actors' => '',
'poster' => '', 'description' => '', 'length' => '',