fix backdrop override by tmdb enrichment

This commit is contained in:
chrisk325 2026-01-01 00:09:33 +05:30 committed by GitHub
parent a9a78d5565
commit fd1107a5a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -177,17 +177,17 @@ export const useMetadataAssets = (
// Only update if request wasn't aborted and component is still mounted
if (!isMountedRef.current) return;
if (details?.backdrop_path) {
if (metadata?.banner) {
finalBanner = metadata.banner;
bannerSourceType = 'default';
} else if (details?.backdrop_path) {
finalBanner = tmdbService.getImageUrl(details.backdrop_path);
bannerSourceType = 'tmdb';
// Preload the image
if (finalBanner) {
FastImage.preload([{ uri: finalBanner }]);
}
} else {
// TMDB has no backdrop, gracefully fall back
finalBanner = metadata?.banner || bannerImage || null;
finalBanner = bannerImage || null;
bannerSourceType = 'default';
}
} catch (error) {
@ -269,4 +269,4 @@ export const useMetadataAssets = (
logoLoadError: false,
setLogoLoadError: () => { },
};
};
};