From fca06204e0bbc4b1165fdf5de3ef0dab32bc2052 Mon Sep 17 00:00:00 2001 From: VenusIsJaded Date: Mon, 22 Jun 2026 11:13:40 +0000 Subject: [PATCH] fix(details): keep addon IMDb rating instead of TMDB score When a metadata addon (e.g. aiometadata) supplies a genuine IMDb rating, the TMDB enrichment on the details page was overwriting it with TMDB's vote_average because the copy() preferred enrichment.rating over the existing value. This made the IMDb placeholder display the TMDB score on mobile, even though the addon provided IMDb ratings (the TV version was already correct). Invert the precedence so the addon-provided imdbRating is kept and TMDB's vote_average is only used as a fallback when no rating was supplied. Fixes #1377 --- .../kotlin/com/nuvio/app/features/tmdb/TmdbMetadataService.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/tmdb/TmdbMetadataService.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/tmdb/TmdbMetadataService.kt index dd690f741..c2a6eaec4 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/tmdb/TmdbMetadataService.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/tmdb/TmdbMetadataService.kt @@ -647,7 +647,8 @@ object TmdbMetadataService { updated = updated.copy( name = enrichment.localizedTitle ?: updated.name, description = enrichment.description ?: updated.description, - imdbRating = enrichment.rating?.formatRating() ?: updated.imdbRating, + imdbRating = updated.imdbRating?.takeIf { it.isNotBlank() } + ?: enrichment.rating?.formatRating(), genres = enrichment.genres.ifEmpty { updated.genres }, ) }