Repository navigation
Description
Artwork is fetched at the server's default sizes no matter how large each screen draws it. On Android TV that leaves logos and episode heroes soft. On phones, detail heroes, episode cards and grid posters are upscaled.
Problem
- The app never chooses an image size. The only
image_sizeit sends is a hardcodedlargeon shuffles (ShufflesV2Api.kt). It fetches/api/v2/images/capabilities, but decodes onlystorage_backendanddelivery. - Android TV:
- Detail logos are drawn up to 325dp (650px) from a 500px image.
- An episode's hero can fall back to a 500px still drawn full-screen.
- Continue Watching and Next Up items drive the hero with their 1280px card backdrop.
- The hero preload hardcodes 1229×756 px (
TvSkylineSectionFeed.kt), which assumes 2× density.
- Phone:
- The 430–540dp detail hero gets a 1920px-wide backdrop, which is 1080px tall.
- Episode cards (630–840px wide) get 500px stills.
- Grids get 300px posters for 290–455px cards.
Server change
This needs a silo-server change that is in progress; its pull request will link here.
-
The server stores originals up to 3840px on the longest edge.
-
Every v2 read that returns artwork, including the recommendation reads, takes per-slot widths next to
image_size:Parameter Field poster_widthposter_urlbackdrop_widthbackdrop_url,backdrop_urlslogo_widthlogo_urlstill_widthan episode's still_urlphoto_widthcast photo_url -
Each value is the width in device pixels the app draws that field at. The server returns the narrowest cached size at least that wide for the image's own type, or the original.
-
GET /api/v2/images/capabilitieslists the parameters inslot_width_params. If the field is absent, the server is older.
Proposed behavior
Compute every width as dp × the device's real density. Don't hardcode pixels.
| Request (Android TV) | Parameters |
|---|---|
Home sections, For You (discover) |
poster_width=88dp, backdrop_width=672dp, logo_width=440dp |
| Item detail | backdrop_width=672dp, logo_width=325dp, photo_width=100dp |
| Episodes | still_width=180dp (230dp outside the series layout) |
| Similar rail | poster_width=130dp |
672dp is the width a 16:9 image needs to fill the 614×378dp hero box without upscaling. The hero backdrop the server returns depends on the UI resolution:
| UI resolution | Density | Hero width | Server returns |
|---|---|---|---|
| 720p | 1.33 | 896px | 1280px |
| 1080p (most devices, including 4K TVs) | 2.0 | 1344px | 1920px |
| 4K | 4.0 | 2688px | original |
Also:
- Request plumbing: add the widths to the request builders (
CatalogV2Api,HomeSectionsV2Api,DiscoverV2Api,SimilarCardsV2Api) and to the Room cache keys (RoomCatalogCacheRepository,RoomHomeCacheRepository). - Pagination: keep the widths fixed for a listing. Continuation cursors are bound to them.
- Hero reuse: send the same
backdrop_widthandlogo_widthon home, For You and detail, so opening an item reuses the cached hero image. - Phone: derive widths from each screen's layout for the detail hero, episodes and grids. In the hero handoff, stop prefetching the card's URL at full-screen size.
- Older servers: when
slot_width_paramsis absent, keep today's requests.
Devices
Android TV / Google TV (primary), phone, tablet.
AI disclosure
- AI harness: Claude Code, running in T3 Code
- AI tool(s): Claude Code
- AI model(s): claude-opus-5-5
- AI involvement: AI-assisted. A maintainer chose the approach; the layout sizes were read from this repository's
main.
Activity