Actualiser js/admin.js

This commit is contained in:
2026-06-30 13:48:49 +02:00
parent 535dc66411
commit 219209e609
+3 -1
View File
@@ -416,13 +416,15 @@ function normalizeVideothequeRow(row) {
let ean = row['ean_isbn13'] || row['EAN'] || row['ean'] || row['Barcode'] || row['UPC'] || row['upc_isbn10'] || '';
if (ean) ean = String(ean).replace(/[^0-9]/g, '');
// ✅ NOUVEAU : Récupérer aussi le titre du CSV
let title = row['title'] ? String(row['title']).trim() : '';
// On garde la ligne si on a au moins un EAN ou un titre
if (!ean && !title) return null;
return {
ean: ean,
title: title
title: title // ✅ Titre envoyé au backend
};
}