Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix platform list image dimensions #24

Merged
merged 2 commits into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion appstore/locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def jsonify_locker_app(entry):
app = entry.app
release = app.releases[-1] if len(app.releases) > 0 else None # type: Release
assets = app.asset_collections
is_watchface = app.type == "watchface"

return {**{
'id': app.id,
Expand Down Expand Up @@ -44,7 +45,7 @@ def jsonify_locker_app(entry):
'description': asset_fallback(assets, x.platform).description,
'images': {
'icon': generate_image_url(app.icon_small, 48, 48, True),
'list': generate_image_url(app.icon_large, 144, 144, True),
'list': generate_image_url(app.icon_large, *plat_dimensions[x.platform] if is_watchface else (144, 144), True),
'screenshot': generate_image_url(asset_fallback(assets, x.platform).screenshots[0],
*plat_dimensions[x.platform])
}
Expand Down