mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-30 12:44:51 +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.
|
// Normalize anime subtypes to their base types for all internal logic.
|
||||||
// anime.series behaves like series; anime.movie behaves like movie.
|
// anime.series behaves like series; anime.movie behaves like movie.
|
||||||
const normalizedType = type === 'anime.series' ? 'series'
|
// Lowercase first — some addons use capitalized types (e.g. "Movie", "Series", "Other")
|
||||||
: type === 'anime.movie' ? 'movie'
|
// which would break all type comparisons downstream.
|
||||||
: type;
|
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 [metadata, setMetadata] = useState<StreamingContent | null>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue