Library art: real gameplay instead of GitHub social cards; accept GIF sources

GitHub's opengraph preview is repo text, stats and an identicon; as a Steam hero
it looked broken. GitHub entries no longer default to it (the store draws its
fallback, Steam gets generated art). Source GIFs (common gameplay captures) are
accepted; the Frame's Chromium draws the first frame. Open Saber Plus uses its
gameplay GIF as banner. Verified on the Frame: hero/wide now show gameplay.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-28 23:12:24 +10:00
1 parent 7990553620
commit b5caee5b86
5 files changed
+18 -9

No files matched your search

+4
View File
@@ -171,6 +171,10 @@ class ArtworkTests(unittest.TestCase):
data = (FIXTURES / 'icon.jpg').read_bytes()
self.assertEqual(art.image_type(data), 'jpg')
self.assertEqual(art.image_type(data + b'\0' * 64), 'jpg') # trailing padding after EOI
gif = b'GIF89a' + struct.pack('<HH', 640, 360) + b'\0' * 20 # gameplay GIFs: first frame drawn
self.assertEqual(art.image_type(gif), 'gif')
with self.assertRaises(ValueError):
art.image_type(b'GIF89a' + struct.pack('<HH', 0, 360) + b'\0' * 20)
with self.assertRaises(ValueError):
art.image_type(data[:30])