Video Store: On Demand as a store you walk through, with covers
Design agreed 2026-10-06. Nothing here is built yet.
On Demand (api/README.md; historical design in history/vod-relay.md) is a text menu: source, category, title. Video Store is a second channel over the same catalog that looks like a rental shop: aisle signs at the door, shelves of covers inside. On Demand stays as it is.
Decisions #
- Its own channel, with its own number, built as a channel module (docs/channel-modules.md). Search stays: the first sign at the door is Search, the existing letter grid and Keyboard key, with matches shown as a shelf of covers.
- Aisles, then shelves. The entrance is a row of retro aisle signs (New Releases, Action, Comedy, Kids, Series...). An aisle is stacked shelves, one per sub-category, each sliding left and right. Up and down move between shelves; "see all" on a shelf opens the whole category as a wall of covers.
- Aisles come from Jev's tags, and the layout is data. Defaults: aisles
from the kinds/genres Jev tagged on each category (already in
OnDemandSettings), shelves from the provider categories inside them. The layout is a stored document, edited in the Manager (rename, reorder, merge, hide aisles; move shelves between them) and served by the relay, so the Apple TV draws whatever it is given. Adult never appears (as in history/vod-relay.md #6). - The relay's Mac fetches and caches covers. From the copy's poster URL
(Plex thumb for Plex copies, TMDB as a fallback by TMDB id), shrunk to a
small cover and kept on disk. Screens ask
GET /v1/vod/titles/<id>/poster(already in the protocol, not yet built). Screens never load provider image hosts. Without a relay there is no Video Store (On Demand's text list is still there). - A title with no cover is a dubbed tape. A black sleeve with a brand stripe (invented brands, one per title), a T-120 strip, and the title in pen on a paper label with a note ("TAPED OFF TV", "DO NOT TAPE OVER"). It looks like a copy somebody made, so a shelf of missing art still looks full and on purpose. Stickers (rewind, staff pick, 2 nights...) go on any case, picked from the title's id so they stay put.
- Shelves are shuffled by day, then by visit.
- Overnight the relay builds each shelf's pool for the day: about 40 titles drawn at random, new additions favored, and warms every cover in it. A shelf is never cold.
- Each visit the screen takes the visible handful from the pool using its
own watch history (
OnDemandResume): started titles first ("continue renting"), finished ones sunk or hidden, the rest reshuffled. Watch history stays on each screen; the relay never sees it. - "See all" is the full category, ordered, never shuffled.
- Select on a cover opens a detail card. The cover big beside the title,
year, plot and the copy line (
3 copies · 4K · Plex). Select plays the best copy (built: Select on the held case plays it, ◀ ▶ turns it over); a second key picks a copy (the existing copy chooser, not built). A series opens its seasons and episodes. - It looks like a 90s rental shop, skeuomorphic. You face the shelves
front-on, like standing at the end of an aisle: wire and laminate shelves
with a lip, carpet-blue and fluorescent-yellow signage, hanging plastic-letter
aisle signs. Our own look, not a real chain's branding.
- Two cases, as in a real store. New releases sit in black rental clamshells (cover in the front, spine sticker down the side); everything else is in cardboard sleeves with a "BE KIND, REWIND" sticker. "New" uses the same rule as the shelf weighting.
- Select pulls the case off the shelf (spring lift and scale, carried to
the detail card with
matchedGeometryEffect) and holds it up; a key turns it over to read the plot on the back (rotation3DEffect). Menu puts it back. - Drawn in code, the case chrome rendered once to a cached image per case type, so a shelf of covers stays smooth on an older Apple TV.
Protocol additions (version 1) #
| Request | Answer |
|---|---|
GET /v1/vod/store |
Today's layout: aisles, shelves, each shelf's pool of title ids. Not built. |
GET /v1/vod/details/<tmdb> |
A movie's plot, genres, director, cast, runtime, trailer and backdrop, from the SQLite store. Built. |
GET /v1/vod/poster/<file>?w=342 |
A poster as HEIC, from the relay's disk. file is a TMDB image's own name; w is 185, 342 or 500. Built. |
GET /v1/vod/subtitles?name=&lang= |
A title's subtitles from OpenSubtitles, as timed lines; also tmdb, year, and season with episode. Not found when there are none or the relay has no key. Built. |
The layout is edited through the Manager's admin routes and persisted with the catalog.
Built: the store and the posters (2026-10-07) #
- A SQLite database on the relay's Mac (
VODStore, in RetroLineup, systemSQLite3, WAL, schema version inuser_version):detailsby TMDB id andgenresin a table of their own with an index on the genre, so "every comedy we know" is a lookup. A title looked up and not found is kept as a miss and tried again after a week; a lookup that fails (offline, a refused request) is never kept. Details are looked at again after 60 days. It lives in~/Library/Application Support/<bundle id>/VOD/titles.sqlite, not Caches (the system may clear those). - Posters (
VODPosters): fetched once from TMDB's image servers at the width asked for, re-encoded as HEIC at quality 0.5 and kept inVOD/posters/w342/…. Measured on one poster: w342 61 KB as JPEG, 34 KB as HEIC; w500 117 KB, 61 KB. About 35–45 MB for a thousand titles. The route takes only a TMDB file name (never a path or an address) and only the three widths, so it can't be pointed at anything else. - Screens ask the relay (
VODAccess.relayBackend(), which never starts a catalog of its own) and fall back to the provider directly (details) or TMDB at the same small size (posters) when there's no relay, or it doesn't have the routes yet. The relay's Mac needs the new Manager installed for the routes to exist. - Not yet: the crawler that fills the store ahead of time (off by default, one request a second, the likeliest shelf titles first); aisles built from the stored genres, with the provider's categories as the fallback; the OMDb scores (Rotten Tomatoes, Metacritic, IMDb, age rating), whose key goes in the Manager; an R2 or S3 copy of the posters folder and the database as a backup.
Built: settings, your place, and the player (2026-10-08) #
-
Settings (
VideoStoreSettings, keyvideostore, synced like any module's; the Manager's Video Store pane, orget_video_store/set_video_store):Field Usual What it is focusScale1.14 How much the case you're on grows on the shelf (1 to 1.4). At its biggest it reaches up in front of the aisle sign. heldScale1 The size of the case held up after Select (0.7 to 1.25). titlesPerShelf20 Cases on each shelf (6 to 40). minRating6 The lowest TMDB rating shelved, when the provider gives one; 0 is anything. earliestYear1980 Nothing older; 0 is any year. skipDooroff Start among the shelves, not at the door. showProgresson A strip under each case you've started. showStatuson What the store is doing, in the corner. The store follows a change at once; one to what's shelved stocks the shelves again. A field missing from a save is its usual value, so a new setting never throws the old ones away.
-
Your place.
OnDemandResumealready kept where you stopped (every 10 seconds, and on Stop or changing channel), on each screen, never synced. It now keeps the title's length too. A title you'd started asks first: Resume at 1:02:03 or Start Over (two buttons on the held case's card, a card over On Demand's menu), with a bar of how far you got. The store knows a title by the same id On Demand does, so a place kept in one is the other's. -
Recently Watched (
OnDemandRecent): the last 30 titles played on this screen, newest first, under Search at the top of On Demand, each with how far you got. Whatever played it counts (the menus or the store), and it keeps the series an episode is from and the title's TMDB id, so its subtitles are found again from there. -
One player for both channels (
OnDemandControls,OnDemandPlayerScreen): ◀ ▶ skip 10 s back and 30 s ahead; ▲ fast forwards and ▼ rewinds, a step faster each press (×10, ×30, ×120). The bar runs ahead while the picture waits, and the file is asked for once, where you stop (Select plays from there, Back calls it off): a network file can't be shown at speed. Select pauses with a menu: Play, Start Over, Subtitles, Audio (when the file has more than one track), Speed (1, 1.25, 1.5, 2×) and Stop. Play/Pause pauses without the menu. -
Subtitles step through off, each of the file's own tracks, then Looked Up. With subtitles on and none in the file, they're looked up.
-
Looked up (
SubtitleLookupon the screen,SubtitleStoreon the relay's Mac,OpenSubtitlesin RetroLineup): the screen asks the relay, which searches OpenSubtitles by TMDB id when the title has one (the store's do), else by name and year, or a series' name with the season and episode. It takes the best file on offer (whole, written by a person, from a trusted uploader, then the most downloaded), reads the .srt and keeps the lines inVOD/subtitles/, because each file fetched counts against the account's daily downloads. A title with none is remembered for a week; a fetch that fails isn't kept. The player draws the lines itself against its own clock, so they're the same on AVPlayer, VLC (MKVs) and Plex, and nothing more is asked of the provider. Nothing is looked up until subtitles are on, the file is known to have none, and you've watched half a minute (picking Looked Up from the menu looks at once). The Manager's Forget Them clears what's kept, for when the wrong film's were.RETRO_SUBTITLES=<name>(withRETRO_SUBTITLES_TMDB) runs one lookup without a screen and prints each step; it spends a download. Not yet run against OpenSubtitles itself: written before there was a key. The key (and optionally an account's login, for the account's own daily downloads) goes in the Manager's On Demand pane, under Subtitles, and syncs like the other keys; Check the Key searches without spending a download. -
The nudge. A looked-up file is timed to one release of the film; another cut is early or late by the same amount throughout. The paused menu's Subtitle Timing row plays the title with ◀ ▶ moving the lines a quarter second earlier or later (▼ ▲ a whole second), Select when they land. It's kept for each title, on each screen.
Open #
- Remote keys for the store (which key opens "see all", which picks the copy).
- Whether series covers and movie covers share shelves or have a Series aisle only.
- Where the shelf pool weights "new" from (provider added-date vs year).
- A spike first: the pull-off and flip with placeholder covers, to judge the feel.
- iPhone and Mac layouts (docs/iphone.md): same layout document, different grid.
Phin Tech docs
Rabbit Ears Manager in the store →