From 3f241c2d072d0a05b9ba8a197e62a774fa538c7b Mon Sep 17 00:00:00 2001 From: castdrian Date: Tue, 20 Jun 2023 19:39:16 +0200 Subject: [PATCH] fix idiotism --- src/backend/metadata/getmeta.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/metadata/getmeta.ts b/src/backend/metadata/getmeta.ts index 6868c7e4..4fd39e7b 100644 --- a/src/backend/metadata/getmeta.ts +++ b/src/backend/metadata/getmeta.ts @@ -99,13 +99,18 @@ export async function getMetaFromId( const episodes = await Tmdb.getEpisodes( details.id.toString(), - season?.season_number ?? 1 + season.season_number === null || season.season_number === 0 + ? 1 + : season.season_number ); if (season && episodes) { seasonData = { id: season.id.toString(), - season_number: season.season_number, + season_number: + season.season_number === null || season.season_number === 0 + ? 1 + : season.season_number, title: season.name, episodes, };