mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
chg: feat: add localization to collections as well
This commit is contained in:
parent
eaa09aba3b
commit
f121b718a9
@ -742,6 +742,8 @@ class TheMovieDatabase(Provider):
|
|||||||
f"collection/{provider_id}",
|
f"collection/{provider_id}",
|
||||||
params={
|
params={
|
||||||
"language": lng.to_tag(),
|
"language": lng.to_tag(),
|
||||||
|
"append_to_response": "images",
|
||||||
|
"include_image_language": f"{lng.language},null,en",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
logger.debug("TMDb responded: %s", collection)
|
logger.debug("TMDb responded: %s", collection)
|
||||||
@ -757,13 +759,9 @@ class TheMovieDatabase(Provider):
|
|||||||
translation = CollectionTranslation(
|
translation = CollectionTranslation(
|
||||||
name=collection["name"],
|
name=collection["name"],
|
||||||
overview=collection["overview"],
|
overview=collection["overview"],
|
||||||
posters=[
|
posters=self.get_best_image(collection, lng, "posters"),
|
||||||
f"https://image.tmdb.org/t/p/original{collection['poster_path']}"
|
|
||||||
],
|
|
||||||
logos=[],
|
logos=[],
|
||||||
thumbnails=[
|
thumbnails=self.get_best_image(collection, lng, "backdrops"),
|
||||||
f"https://image.tmdb.org/t/p/original{collection['backdrop_path']}"
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
ret.translations = {lng.to_tag(): translation}
|
ret.translations = {lng.to_tag(): translation}
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user