From 422773340867791c3126c0ec2b5671f121be9d26 Mon Sep 17 00:00:00 2001
From: Grouvex <168425996+Grouvex@users.noreply.github.com>
Date: Fri, 28 Feb 2025 16:04:34 +0100
Subject: [PATCH] Update discografia.html
Signed-off-by: Grouvex <168425996+Grouvex@users.noreply.github.com>
---
grouvex/discografia.html | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/grouvex/discografia.html b/grouvex/discografia.html
index 029e80f..cd22604 100644
--- a/grouvex/discografia.html
+++ b/grouvex/discografia.html
@@ -212,10 +212,10 @@
${lanzamiento.titulo}
];
// Filtrar lanzamientos recientes
- const lanzamientosRecientes = todosLosLanzamientos.filter(lanzamiento => lanzamiento.fecha >= unMesAntes && lanzamiento.fecha <= ahora);
+ const lanzamientosRecientes = todosLosLanzamientos.filter(lanzamiento => lanzamiento.fechaL >= unMesAntes && lanzamiento.fechaL <= ahora);
// Ordenar lanzamientos por fecha (de más reciente a más antiguo)
- lanzamientosRecientes.sort((a, b) => b.fecha - a.fecha);
+ lanzamientosRecientes.sort((a, b) => b.fechaL - a.fechaL);
const contenedorRecientes = document.getElementById('lanzamientos-recientes');
if (contenedorRecientes) {
@@ -376,7 +376,9 @@ Álbums
`;
albumes.forEach(album => {
- actualizarFechas(album.fecha, `f1_${album.fecha}`);
+ if (album.fechaO != null) {actualizarFechas(album.fechaO, `fecha-${album.fechaO}`);}
+ if (album.fechaL != null) {actualizarFechas(album.fechaL, `fecha-${album.fechaL}`);}
+ if (album.fechaPS != null) {actualizarFechas(album.fechaPS, `fecha-${album.fechaPS}`);}
});
} else {
console.error('El elemento con id="contenido" no existe en el DOM.');
@@ -418,7 +420,9 @@ Reproducción Extendida (EP)
`;
ep.forEach(ep => {
- actualizarFechas(ep.fecha, `f1_${ep.fecha}`);
+ if (ep.fechaO != null) {actualizarFechas(ep.fechaO, `fecha-${ep.fechaO}`);}
+ if (ep.fechaL != null) {actualizarFechas(ep.fechaL, `fecha-${ep.fechaL}`);}
+ if (ep.fechaPS != null) {actualizarFechas(ep.fechaPS, `fecha-${ep.fechaPS}`);}
});
} else {
console.error('El elemento con id="contenido" no existe en el DOM.');