NuvioStreaming/composeApp/src/commonMain
Stéphane 6e84b3ac36 fix(tmdb): localize collection part artwork via /images endpoint
TMDB's `collection/{id}?language=fr` returns one default `poster_path` /
`backdrop_path` per part — almost always the English-favored asset
regardless of the language query param. The only way to actually get
artwork in the user's language is to call
`/movie/{id}/images?include_image_language=fr,null,en` separately and
pick the best localized poster/backdrop.

Two consumers were affected:

- `TmdbCollectionSourceResolver.resolveCollection` — Collection-folder
  rows on home (user-defined "Star Wars Saga", "Marvel", etc.) showed
  English posters even when the app's TMDB language is `fr`.
- `TmdbMetadataService.fetchCollection` — the "Saga" / "Belongs to
  collection" row on movie detail pages had the same problem.

Both now fan out one parallel `/images` call per part, ranked through the
existing `selectBestLocalizedImagePath` helper (already used for logos),
and fall back to `part.posterPath` / `part.backdropPath` only when no
localized image is available.

The new helper `TmdbMetadataService.fetchLocalizedArtwork()` is shared
and cached per `(tmdbId, mediaType, language)`. For English locales the
extra call is skipped — the default poster path is already English-favored.

Mirrors the equivalent fix in NuvioTV (the `fetchMovieCollection` path
already does this; `resolveCollection` did not).
2026-05-13 19:33:48 +02:00
..
composeResources Merge pull request #1031 from foXaCe/fix/percent-display 2026-05-13 14:03:30 +05:30
kotlin/com/nuvio/app fix(tmdb): localize collection part artwork via /images endpoint 2026-05-13 19:33:48 +02:00