Actualiser js/public.js

This commit is contained in:
2026-07-02 17:00:42 +02:00
parent de0c2a0b7b
commit d1272f1bdc
+5 -1
View File
@@ -50,7 +50,11 @@ function generateStreamingSelect() {
async function loadPublicData() {
try {
const response = await fetch(`${API_URL}?action=get_films`, { cache: 'default' });
films = await response.json();
const data = await response.json();
// ✅ CORRECTION : Fusionner les deux tableaux en un seul
films = [...(data.critique || []), ...(data.videotheque || [])];
generateStreamingSelect();
// Écouteur pour le filtre physique