mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 03:00:18 +02:00
SteamGridDB: request PNG only for logos and icons
The live API rejects mimes=image/jpeg on /logos and /icons, so every logo and icon lookup fell back to generated art. Found with a real key: SuperTux now gets grid, wide, hero and logo; Beat Saber all five. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d18f1655be
commit
2c8e2fb2a8
2 files changed
+7
-1
No files matched your search
@@ -84,7 +84,9 @@ def lookup(name, deadline=None):
|
||||
for slot, kind, dimensions in [('grid', 'grids', '600x900'), ('wide', 'grids', '920x430'),
|
||||
('hero', 'heroes', ''), ('logo', 'logos', ''), ('icon', 'icons', '')]:
|
||||
try:
|
||||
query = {'types': 'static', 'nsfw': 'false', 'humor': 'false', 'mimes': 'image/png,image/jpeg'}
|
||||
# Logos and icons only come as PNG (or WebP/ICO); asking for JPEG there is rejected outright.
|
||||
mimes = 'image/png,image/jpeg' if kind in ('grids', 'heroes') else 'image/png'
|
||||
query = {'types': 'static', 'nsfw': 'false', 'humor': 'false', 'mimes': mimes}
|
||||
if dimensions:
|
||||
query['dimensions'] = dimensions
|
||||
records = _get('/' + kind + '/game/' + str(gid) + '?' + urllib.parse.urlencode(query), key, deadline)
|
||||
|
||||
Reference in new issue
Block a user