[presto] Update tests/references to medium cover size

This commit is contained in:
Claudio Ortolina
2026-05-16 21:28:09 +01:00
parent fb84bcb525
commit d61dd6c7b8
5 changed files with 28 additions and 28 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ _These rules apply to any scrollable view (day list, detail page, or future addi
## Image Handling
- Row thumbnails use `covers.small` from the API. Detail covers use `covers.medium`.
- The API provides display-ready JPEG sizes: `covers.small` is 80px and `covers.medium` is 460px. Do not resize covers on the device.
- The API provides the row thumbnail size directly: `covers.small` is 80px. Detail covers use `covers.medium` in a `DETAIL_COVER_SIZE = px(200)` 400px layout area; do not expand it to fill the 480px display unless explicitly requested.
- Cache downloaded image bytes on the record dict. Use separate cache keys for different sizes (e.g., `_thumb_data` for rows, `_detail_thumb_data` for detail view). Never fetch images during drag — show placeholders instead and repaint real covers on release.
- JPEG is the practical default. PNG has worse memory characteristics; raw/RGB565 needs a confirmed stable blit API on the target firmware.
+3 -3
View File
@@ -102,7 +102,7 @@ The Presto runs `main.py` on boot. The app will:
### Record detail view
- Tap any **record row** in the day view to open its detail page
- Shows a **larger cover image** (uses `covers.medium`, 460px source), the full title, artists, genres, record type, format, release year, and purchase date
- Shows a **larger cover image** (uses `covers.medium` in a 400×400 detail cover area), the full title, artists, genres, record type, format, release year, and purchase date
- Drag vertically to scroll if the content is taller than the screen
- The header bar stays fixed at the top while the cover and info scroll underneath
- Tap **< Back** to return to the day view
@@ -210,7 +210,7 @@ Response format:
"covers": {
"original": "https://.../api/v1/assets/original",
"large": "https://.../api/v1/assets/large-1000",
"medium": "https://.../api/v1/assets/medium-460",
"medium": "https://.../api/v1/assets/medium",
"small": "https://.../api/v1/assets/small-80"
},
"release_date": "1973-03-01",
@@ -224,7 +224,7 @@ Response format:
```
The Presto client uses `covers.small` for the 80×80 full-resolution row thumbnail.
The detail view uses `covers.medium` for the 460×460 cover centered in the 480×480 display.
The detail view uses `covers.medium` in a 400×400 cover area centered in the 480×480 display.
The app does not resize covers on the device; it expects the API to provide display-ready JPEGs.
## License
+2 -2
View File
@@ -132,8 +132,8 @@ class TestSmokeScreens:
rec = make_mock_record(0)
assert main_module.THUMB_SIZE == 80
assert main_module.DETAIL_COVER_SIZE == 460
assert main_module.DETAIL_COVER_X == 10
assert main_module.DETAIL_COVER_SIZE == 400
assert main_module.DETAIL_COVER_X == 40
assert main_module._record_thumbnail_url(rec).endswith("/small-0.jpg")
assert main_module._record_detail_cover_url(rec).endswith("/medium-0.jpg")