mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Use image selection logic for trailers (#497)
This commit is contained in:
parent
c249816808
commit
299b3e2328
@ -58,7 +58,7 @@ class Movie:
|
|||||||
"poster": select_image(self, "posters"),
|
"poster": select_image(self, "posters"),
|
||||||
"thumbnail": select_image(self, "thumbnails"),
|
"thumbnail": select_image(self, "thumbnails"),
|
||||||
"logo": select_image(self, "logos"),
|
"logo": select_image(self, "logos"),
|
||||||
"trailer": next(iter(trans.trailers), None),
|
"trailer": select_image(self, "trailers"),
|
||||||
"studio": next((x.to_kyoo() for x in self.studios), None),
|
"studio": next((x.to_kyoo() for x in self.studios), None),
|
||||||
"genres": [x.to_kyoo() for x in self.genres],
|
"genres": [x.to_kyoo() for x in self.genres],
|
||||||
"collections": None,
|
"collections": None,
|
||||||
|
@ -61,7 +61,7 @@ class Show:
|
|||||||
"poster": select_image(self, "posters"),
|
"poster": select_image(self, "posters"),
|
||||||
"thumbnail": select_image(self, "thumbnails"),
|
"thumbnail": select_image(self, "thumbnails"),
|
||||||
"logo": select_image(self, "logos"),
|
"logo": select_image(self, "logos"),
|
||||||
"trailer": next(iter(trans.trailers), None),
|
"trailer": select_image(self, "trailers"),
|
||||||
"genres": [x.to_kyoo() for x in self.genres],
|
"genres": [x.to_kyoo() for x in self.genres],
|
||||||
"file_title": None,
|
"file_title": None,
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ def select_translation(
|
|||||||
|
|
||||||
def select_image(
|
def select_image(
|
||||||
value: Movie | Show | Season | Collection,
|
value: Movie | Show | Season | Collection,
|
||||||
kind: Literal["posters"] | Literal["thumbnails"] | Literal["logos"],
|
kind: Literal["posters", "thumbnails", "logos", "trailers"],
|
||||||
) -> str | None:
|
) -> str | None:
|
||||||
return next(
|
return next(
|
||||||
chain(
|
chain(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user