From 2d8a07472bd1f07df167c20c0c89bdc6dfb85b98 Mon Sep 17 00:00:00 2001 From: chrisk325 Date: Sun, 22 Mar 2026 01:00:15 +0530 Subject: [PATCH] minor fix --- src/services/catalog/search.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/services/catalog/search.ts b/src/services/catalog/search.ts index ffd75805..b9142a48 100644 --- a/src/services/catalog/search.ts +++ b/src/services/catalog/search.ts @@ -393,9 +393,17 @@ function dedupeAndStampResults(results: StreamingContent[], catalogType: string) } } - return Array.from(bestById.values()).map(item => - catalogType && item.type !== catalogType ? { ...item, type: catalogType } : item - ); + const normalizedCatalogType = catalogType ? catalogType.toLowerCase() : catalogType; + const STANDARD_TYPES = new Set(['movie', 'series', 'anime.movie', 'anime.series', 'anime', 'tv', 'channel']); + + return Array.from(bestById.values()).map(item => { + // Only stamp catalog type if item doesn't already have a standard type. + // Prevents "other" from overwriting correct types like "movie"/"series". + if (normalizedCatalogType && !STANDARD_TYPES.has(item.type) && STANDARD_TYPES.has(normalizedCatalogType)) { + return { ...item, type: normalizedCatalogType }; + } + return item; + }); } function buildSectionName(