From 63146fdc27d98acb70cf86c7890ea1236388d717 Mon Sep 17 00:00:00 2001 From: MasutaYunikon Date: Fri, 26 Jun 2026 15:21:55 +0200 Subject: [PATCH] fix(serie): ajout du label de saisons avec les episodes --- src/components/serie/SerieSeasonCard.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/serie/SerieSeasonCard.vue b/src/components/serie/SerieSeasonCard.vue index fe5adbf..319f679 100644 --- a/src/components/serie/SerieSeasonCard.vue +++ b/src/components/serie/SerieSeasonCard.vue @@ -618,19 +618,21 @@ function _parseEpChap(plot: string | null | undefined): { const seasonMatch = text.match(/saison\s+(\d+)/i) + const season = epMatch?.[3] ?? seasonMatch?.[1] ?? null + const chapMatch = text.match( /chapitres?\s+(\d+)(?:\s+[àa]\s+(\d+))?/i ) const episodes = epMatch - ? (epMatch[2] ? `Ép. ${epMatch[1]}–${epMatch[2]}` : `Ép. ${epMatch[1]}`) + ? `${season ? `S${season} · ` : ''}${ + epMatch[2] + ? `Ép. ${epMatch[1]}–${epMatch[2]}` + : `Ép. ${epMatch[1]}` + }` : null - const season = epMatch?.[3] - ? Number(epMatch[3]) - : seasonMatch - ? Number(seasonMatch[1]) - : null + const chapters = chapMatch ? (chapMatch[2] ? `Ch. ${chapMatch[1]}–${chapMatch[2]}` : `Ch. ${chapMatch[1]}`)