fetch addon provided logo first if it errors then fallback to tmdb

This commit is contained in:
chrisk325 2025-12-30 17:20:33 +05:30 committed by GitHub
parent 67b16c27f3
commit d4917fefc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -909,8 +909,13 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
// Centralized logo fetching logic
try {
if (addonLogo) {
finalMetadata.logo = addonLogo;
if (__DEV__) {
console.log('[useMetadata] Using addon-provided logo:', { hasLogo: true });
}
// Check both master switch AND granular logos setting
if (settings.enrichMetadataWithTMDB && settings.tmdbEnrichLogos) {
} else if (settings.enrichMetadataWithTMDB && settings.tmdbEnrichLogos) {
// Only use TMDB logos when both enrichment AND logos option are ON
const tmdbService = TMDBService.getInstance();
const preferredLanguage = settings.tmdbLanguagePreference || 'en';
@ -2464,4 +2469,4 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
collectionMovies,
loadingCollection,
};
};
};