Actualiser js/public.js
This commit is contained in:
+5
-2
@@ -109,9 +109,12 @@ function renderPublicGrid() {
|
||||
// 1. Filtrage par type
|
||||
let filtered = films.filter(f => f.type === currentPubTab);
|
||||
|
||||
// 2. Filtre par note
|
||||
// Filtre par note (regroupement : 5★ inclut 4.5, 4★ inclut 3.5, etc.)
|
||||
if (currentPubTab === 'critique' && activeRatingFilter > 0) {
|
||||
filtered = filtered.filter(f => Math.round(parseFloat(f.rating)) === activeRatingFilter);
|
||||
filtered = filtered.filter(f => {
|
||||
const rating = parseFloat(f.rating) || 0;
|
||||
return Math.round(rating) === activeRatingFilter;
|
||||
});
|
||||
}
|
||||
|
||||
// 3. Filtre par plateforme (avec normalisation)
|
||||
|
||||
Reference in New Issue
Block a user