feat(games): show games in library mode also
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user