fix streams fetching for unusual type and use addon's meta response

This commit is contained in:
chrisk325 2026-03-21 14:00:58 +05:30 committed by GitHub
parent 9b936e169c
commit 792c8a9187
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1576,7 +1576,9 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
let tmdbId;
let stremioId = id;
// Use TMDB-resolved type if available — handles "other", "Movie", etc.
let effectiveStreamType: string = resolvedTypeRef.current || normalizedType;
// Use metadata.type first (most reliable — comes directly from the addon's meta response),
// then fall back to TMDB-resolved type, then normalizedType.
let effectiveStreamType: string = metadata?.type || resolvedTypeRef.current || normalizedType;
if (id.startsWith('tmdb:')) {
tmdbId = id.split(':')[1];