mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-29 05:48:45 +00:00
minor fix
This commit is contained in:
parent
7f7f6afc81
commit
2d8a07472b
1 changed files with 11 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue