From aaec20e329fd4af58b3e8584280f098ede7022f2 Mon Sep 17 00:00:00 2001 From: SpackledJim Date: Mon, 28 Sep 2026 22:02:27 +1000 Subject: [PATCH] fix: use highest season number for season count The show embed counted the entries in the seasons list, which gave the wrong number. It now shows the highest season number in that list. Seasons without a number count as 0, and an empty list shows 0. Co-Authored-By: Claude Opus 5.5 --- src/lib/messages.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/messages.ts b/src/lib/messages.ts index 3ae82a5..4575257 100644 --- a/src/lib/messages.ts +++ b/src/lib/messages.ts @@ -25,7 +25,8 @@ export function buildShowEmbed( }, { name: "Seasons", - value: tvdbSeries.seasons.length.toFixed(0), + value: Math.max(0, ...tvdbSeries.seasons.map((s) => s.number ?? 0)) + .toFixed(0), inline: true, }, {