feat(games): show games in library mode also

This commit is contained in:
2026-10-16 02:41:27 +02:00
parent 54ffe89445
commit 2f8fdb755b
7 changed files with 97 additions and 4 deletions
+9
View File
@@ -25,6 +25,7 @@ class SteamGameOut(Schema):
steam_app_id: int
store_url: str
header_image: str
library_image: str
short_description: str
is_free: bool
currency: str
@@ -44,6 +45,14 @@ class SteamGameOut(Schema):
or f"https://cdn.akamai.steamstatic.com/steam/apps/{obj.steam_app_id}/header.jpg"
)
@staticmethod
def resolve_library_image(obj) -> str:
# Vertical capsule, like in the Steam library
return (
obj.library_image
or f"https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/{obj.steam_app_id}/library_600x900.jpg"
)
@staticmethod
def resolve_short_description(obj) -> str:
return obj.steam_short_description