From f121b718a94649ec4f7990813bb4df09cadf5581 Mon Sep 17 00:00:00 2001 From: Felipe Marinho Date: Fri, 15 Nov 2024 11:13:06 -0300 Subject: [PATCH] chg: feat: add localization to collections as well --- scanner/providers/implementations/themoviedatabase.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scanner/providers/implementations/themoviedatabase.py b/scanner/providers/implementations/themoviedatabase.py index 4fe86346..0d0ee8ae 100644 --- a/scanner/providers/implementations/themoviedatabase.py +++ b/scanner/providers/implementations/themoviedatabase.py @@ -742,6 +742,8 @@ class TheMovieDatabase(Provider): f"collection/{provider_id}", params={ "language": lng.to_tag(), + "append_to_response": "images", + "include_image_language": f"{lng.language},null,en", }, ) logger.debug("TMDb responded: %s", collection) @@ -757,13 +759,9 @@ class TheMovieDatabase(Provider): translation = CollectionTranslation( name=collection["name"], overview=collection["overview"], - posters=[ - f"https://image.tmdb.org/t/p/original{collection['poster_path']}" - ], + posters=self.get_best_image(collection, lng, "posters"), logos=[], - thumbnails=[ - f"https://image.tmdb.org/t/p/original{collection['backdrop_path']}" - ], + thumbnails=self.get_best_image(collection, lng, "backdrops"), ) ret.translations = {lng.to_tag(): translation} return ret