Add smaller sizes for EGS media

This commit is contained in:
Mathieu Comandon 2021-08-30 14:59:53 -07:00
parent b8f879fbb6
commit 06c9b42010

View file

@ -76,6 +76,8 @@ class DieselGameBoxTall(DieselGameMedia):
for filename in os.listdir(self.dest_path):
self._render_filename(filename)
class DieselGameBoxSmall(DieselGameBoxTall):
size = (100, 133)
class DieselGameBox(DieselGameBoxTall):
"""EGS game box"""
@ -85,6 +87,8 @@ class DieselGameBox(DieselGameBoxTall):
dest_path = os.path.join(settings.CACHE_DIR, "egs/game_box")
api_field = "DieselGameBox"
class DieselGameBannerSmall(DieselGameBox):
size = (158, 89)
class DieselGameBoxLogo(DieselGameMedia):
"""EGS game box"""
@ -120,13 +124,15 @@ class EpicGamesStoreService(OnlineService):
runner = "wine"
client_installer = "epic-games-store-latest"
medias = {
"game_box_small": DieselGameBoxSmall,
"game_banner_small": DieselGameBannerSmall,
"game_box": DieselGameBox,
"box_tall": DieselGameBoxTall,
}
extra_medias = {
"logo": DieselGameBoxLogo,
}
default_format = "box_tall"
default_format = "game_banner_small"
requires_login_page = True
cookies_path = os.path.join(settings.CACHE_DIR, ".egs.auth")
token_path = os.path.join(settings.CACHE_DIR, ".egs.token")