mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-22 18:47:44 +00:00
fix lower case standardization for search catalogs
This commit is contained in:
parent
5f49a7f2ab
commit
f8cfdc8ced
1 changed files with 9 additions and 3 deletions
|
|
@ -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<StreamingContent | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue