From f8cfdc8ced729ccec4c65a9b06abdfbcea2b6beb Mon Sep 17 00:00:00 2001 From: chrisk325 Date: Tue, 17 Mar 2026 02:27:13 +0530 Subject: [PATCH 1/2] fix lower case standardization for search catalogs --- src/hooks/useMetadata.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/hooks/useMetadata.ts b/src/hooks/useMetadata.ts index 0b5c90c8..c9e3c6ba 100644 --- a/src/hooks/useMetadata.ts +++ b/src/hooks/useMetadata.ts @@ -117,9 +117,15 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat // Normalize anime subtypes to their base types for all internal logic. // anime.series behaves like series; anime.movie behaves like movie. - const normalizedType = type === 'anime.series' ? 'series' - : type === 'anime.movie' ? 'movie' - : type; + // Lowercase first — some addons use capitalized types (e.g. "Movie", "Series", "Other") + // which would break all type comparisons downstream. + const lowercasedType = type ? type.toLowerCase() : type; + + // Normalize anime subtypes to their base types for all internal logic. + // anime.series behaves like series; anime.movie behaves like movie. + const normalizedType = lowercasedType === 'anime.series' ? 'series' + : lowercasedType === 'anime.movie' ? 'movie' + : lowercasedType; const [metadata, setMetadata] = useState(null); const [loading, setLoading] = useState(true); From 1962e66fb488f26652d0874851b68870c4f2b5bd Mon Sep 17 00:00:00 2001 From: chrisk325 Date: Tue, 17 Mar 2026 02:29:33 +0530 Subject: [PATCH 2/2] fix lower case standardization for search catalogs --- src/services/catalogService.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/services/catalogService.ts b/src/services/catalogService.ts index f918947d..448cafa3 100644 --- a/src/services/catalogService.ts +++ b/src/services/catalogService.ts @@ -1731,12 +1731,25 @@ class CatalogService { if (metas.length > 0) { const items = metas.map(meta => { const content = this.convertMetaToStreamingContent(meta); - content.addonId = manifest.id; + // Only set addonId to this addon if it also supports the meta resource. + // Search-only addons (e.g. AI search, people search) don't serve metadata — + // leaving addonId unset lets useMetadata fall through to a proper meta addon. + const addonSupportsMeta = Array.isArray(manifest.resources) && manifest.resources.some((r: any) => + r === 'meta' || (typeof r === 'object' && r?.name === 'meta') + ); + + if (addonSupportsMeta) { + content.addonId = manifest.id; + } // The meta's own type field may be generic (e.g. "series") even when // the catalog it came from is more specific (e.g. "anime.series"). // Stamp the catalog type so grouping in the UI is correct. - if (type && content.type !== type) { - content.type = type; + // Also lowercase — some addons declare types with capital letters (e.g. "Movie", "Other"). + const normalizedCatalogType = type ? type.toLowerCase() : type; + if (normalizedCatalogType && content.type !== normalizedCatalogType) { + content.type = normalizedCatalogType; + } else if (content.type) { + content.type = content.type.toLowerCase(); } return content; });