GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kaanisthatyou/roll-credits: Picks one thing to watch tonight out of everything you can actually stream, and hands you the link. Rust + Tauri, no build step, flat-odds cases.

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
scripts
scripts
 
 
src-tauri
src-tauri
 
 
src
src
 
 
.gitignore
.gitignore
 
 
ACCEPTANCE.md
ACCEPTANCE.md
 
 
LICENSE
LICENSE
 
 
PLAN.md
PLAN.md
 
 
README.md
README.md
 
 
implementation_plan.md
implementation_plan.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
spec-roll-credits.md
spec-roll-credits.md
 
 

Repository files navigation

Roll Credits

A desktop app that picks one thing to watch tonight out of everything you can actually stream — and hands you the link to go watch it.

Press one button. Five seconds later a card says Game of Thrones · S03E07 · The Rains of Castamere with a TV+ button under it that opens the episode. No library to curate, no list to import, nothing to maintain.

The catalogue is never downloaded. JustWatch indexes 41,738 titles for Turkey, of which 26,770 can actually be watched there; the United States indexes 203,742. The app stores none of it — only the handful of titles it has shown you, a bounded poster cache, and what you told it you watched.

Windows desktop app. Rust + SQLite behind a Tauri webview, with a frontend of about twenty ES modules and no build step and no runtime dependencies.

The deck


Contents

  • Two ways to decide
  • Your own list
  • How the draw works
  • The case shelf
  • Build · Testing
  • What it talks to
  • The scripts that keep the catalogue honest
  • Licence and attribution

Two ways to decide, and seventeen ways to be told

The answer is drawn and written before any of this is painted; what you choose is how it is delivered. The three formats you play yourself are the documented exception, and they are marked with a ⌨ wherever they are offered.

Leave it to chance when you have no idea what you want. The pool is narrowed by what — anything, films only, series only, or a series you follow — by genre, and by how well known it has to be — because a uniform draw over a national catalogue hands you something eleven people have seen most of the time, which is honest and not always what you want at eleven at night. Then the reel runs sixty-four tapes past the head, the wheel spins twelve wedges, or straight to it skips the ceremony.

Settle it between titles when you already know the two things you are torn between. Search for them by name, or press pick for me, and pick from eleven formats: a coin, a stand-off, a marble race, a roll-off, high card, semi-finals, last one standing, a horse race, an eight-seat bracket — and two you play yourself: a tug of war and a penalty shootout. See surfaces/battle.js and pickers/.

The played two are the one place in the app where the answer is not drawn. A tug of war is one key each and whoever presses faster drags the rope over; a shootout is five penalties each, taken by the two of you, against a keeper who commits to covering two of the five corners — three, a third of the time — and then shows you, in red and green, exactly which ones he had. Nothing is drawn and nothing is written down until the game is over, which is the honest way round and costs exactly one thing: quitting mid-game loses the game, because a half-finished tug of war has no winner to resume.

Or bring your own list. Four people round a laptop, each with something in mind: type the names in and spin a proper wheel of names for it. Entries are free text, so they need not be anything the catalogue has heard of — somebody's name, a show nobody can spell, or order a pizza. Ten formats work over a custom list, filtered to the ones your number of entries can honestly run. Nothing is logged, because the app has no idea what you typed and pretending otherwise would put a pizza in your viewing history.

Or open a case. Two hundred and sixty-odd of them, on two shelves — films and series — by genre and era, by franchise (Star Wars, Middle-earth, Bond, the MCU), by director or actor (Kurosawa, Kubrick, Denzel, Toshiro-adjacent, ninety more), by service, by how well known. A case holds a fixed field you can look inside before you open it, graded by rarity from industrial up to a single gold — and the odds are flat, every title exactly as likely as the gold. The rarity is rank within that case, so a film can be the red one in its own franchise and the gold in a weaker field. See cases.rs.

Setting up a battle

Naming a field costs nothing and can be walked away from: nothing is decided until the animation starts, and the animation only ever catches up with a decision already made — except in the three played formats, where the animation is the decision and there is nothing to catch up with.

Once a card is up there are three answers, not two: play it, keep it for later, or turn it down. The middle one was missing for a long time, and its absence meant the only way to say "good, but not tonight" was the rejection — which buries a title for a fortnight, the exact opposite. Keeping changes nothing about what the draw can hand you.

There is also a fourth exit, which is not an answer: ← back, or Escape. A roll is written down before it is painted — that is what makes killing the app mid-animation safe, because the same card comes back — so leaving has to close the roll on the way out, or the card you deliberately walked away from is the first thing the app says on every launch for the rest of the night. It closes the roll and says nothing at all about the title.

And everything is reversible. A rejection can be released, a night's ledger can be un-logged after it commits, a kept title can be dropped, settings can be put back. The only thing the app will not undo is a title you actually watched, and it will forget that too if you ask it to.

How the draw works

The interesting problem. JustWatch's pagination stops answering past about 1,600 rows, so a naive "random offset in the catalogue" would reach 4% of it and hand you the same popular titles forever.

popularTitles accepts sortBy: RANDOM with a sortRandomSeed, and a fresh seed reshuffles the entire result set — so row zero of a random shuffle is a uniform sample of the whole catalogue, in one request. Verified rather than assumed: 500 live draws binned by release decade give χ²/df = 0.85 against the catalogue's own shape, and 495 distinct titles out of 500.

Every filter — genre, provider, release year, type, rent & buy — is another field on the same request and none of them disturbs that.

The case shelf

The case shelf

266 cases across two shelves. A case is a fixed field of up to 48 titles — stocked once from the live catalogue, then held still for three weeks — so you can look inside one before you open it.

Looking inside a case

The tiers are computed by rank within that case, which is why the same film can be the red one in its own franchise and the gold in a weaker field. The odds are flat: opening a case is a uniform index into it, and the gold is exactly as likely as the greyest thing beside it. That is measured, not asserted — every_title_in_a_case_has_the_same_chance opens a twenty-title case ten thousand times and checks the spread.

Cases are built from real queries rather than hand-typed lists, so they cannot rot: a genre and a decade, a searchQuery for a franchise, or a personId for a director or actor (tp1725 returns Christopher Nolan's seventeen films). Three scripts keep that honest — see Testing.

Build

Needs a Rust toolchain, Node (for the Tauri CLI only — the app has no runtime JS dependencies and no build step), and on Windows the MSVC Build Tools.

That last one is not optional and not obvious: with the x86_64-pc-windows-msvc target and no link.exe, even cargo check fails, because proc-macro crates compile to DLLs and have to link. The error is linker 'link.exe' not found.

winget install Microsoft.VisualStudio.2022.BuildTools --override `
  "--quiet --wait --norestart --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"

It needs administrator approval and downloads a few GB. The GNU toolchain is not a shortcut: libsqlite3-sys is built with bundled, so it needs a C compiler either way.

If you cannot get administrator rights

The same compiler can be assembled per-user, because everything the installer would place is downloadable on its own:

  • The VS package catalog lists every payload with a direct URL. It is public, and a copy is usually already cached under %ProgramData%\Microsoft\VisualStudio\Packages\_Channels\.
  • .vsix payloads are plain zip files, and tar -xf (bsdtar ships with Windows) opens them. You need Tools.HostX64.TargetX64, CRT.Headers, the CRT.x64.* packages, and — easy to miss — the matching *.Res.base packages, without which cl.exe dies on Cannot load language resource clui.dll.
  • The Windows SDK arrives as MSIs plus cabs. msiexec /a <msi> /qn TARGETDIR=<dir> extracts them; despite being called an administrative install, it needs no elevation. Extract all of them — the common libraries (kernel32.lib and friends) are spread across several.

Then point INCLUDE, LIB and PATH at the result. Nothing is installed system-wide.

npm install          # installs @tauri-apps/cli and playwright
npm run dev          # dev window, hot reloads src/
npm run build        # release bundle -> src-tauri/target/release/bundle/
npm test             # the Rust test suite
npm run test:live    # the tests that hit JustWatch and TVmaze for real
npm run assets       # regenerate the icon set and the noise texture

Testing

Three layers, and the middle one is the interesting one.

Rust unit tests (npm test) cover every rule: the night boundary, rejection holding a title out of the pool, the ledger's commit sweep, episode ordering, the poster cache's eviction order, and the JustWatch parser against a fixture trimmed from a real response.

Live tests (npm run test:live) actually call JustWatch and TVmaze. They are #[ignore] so an offline build stays green, and they exist because a parser that passes against a fixture proves nothing about an undocumented endpoint that can change under it. One of them is the 500-draw distribution proof.

UI checks (npm run check:ui) drive the real frontend in Chromium against an in-memory backend — 66 assertions covering rolling being unlimited, rejection dealing another card and holding the last one back, the ledger staging and undoing, the watch links, search and follow, picked mode, the case roll degrading under prefers-reduced-motion, and everything that can be taken back: releasing a hold, un-logging a committed night, dropping something off the shortlist, resetting settings.

Two of them are worth calling out because they exist for defects rather than features. ?starve=1 makes the mock return a roll with no fillers at all — what a rate-limited JustWatch actually hands back — and asserts the reel degrades to blank tape rather than painting the winner into all sixty-four cells, which is what it used to do. And courseSpec is called six times directly to prove the marble race generates a fresh course per race, rather than inferring it from two races that looked different.

npm run mock         # serves src/ at http://localhost:5273/?mock=1
npm run check:ui     # 66 behavioural assertions
npm run shots        # captures every surface to .shots/
npm run test:proof   # the heavy live tests, including the 500-draw proof

Do not run test:proof in a loop. Several hundred automated requests in an afternoon is enough for JustWatch to start answering 403 to everything from your address, for hours. It happened here. The heavy tests are gated behind RC_PROOF on top of #[ignore] for that reason. Normal use is nowhere near it — a roll is about two requests, so even a picky night spent rejecting a dozen cards is two dozen.

The mock only loads when window.__TAURI__ is absent and ?mock=1 is in the URL, so it cannot activate inside the shipped app.

Where the rules live

The mock is a stand-in for developing the UI, not a second implementation. Every rule that matters — the draw, the night boundary, the 14-day hold a rejection puts on a title, the ledger's commit sweep, episode ordering — is defined and tested in Rust under src-tauri/src/. If the two ever disagree, Rust is right.

What it talks to

Three hosts, and a test that fails if a fourth ever appears:

Host For
apis.justwatch.com the catalogue, the counts and the watch links
images.justwatch.com posters
api.tvmaze.com episode lists, joined on the IMDb id JustWatch returns

No API keys. No account. No server of ours — Rust makes every request, so there is no CORS to route around and nothing to host.

Not TMDB, and not by preference: api.themoviedb.org, image.tmdb.org and files.tmdb.org all resolve to 127.0.0.1 from the machine this was built on. The whole domain is DNS-blackholed by the ISP, so it is unreachable here.

The scripts that keep the catalogue honest

A case is a query written by hand into a source file, which makes it a hypothesis until something runs it. Three scripts are the something.

Command What it does
npm run gen:cases regenerates src/js/dev/cases.fixture.js from cases.rs, so the mock shelf cannot drift from the real one. A Rust test fails if you forget.
node scripts/resolve-people.mjs turns names into JustWatch person ids and reports how many titles each has, so "if they have enough movies to make a case" is a number rather than a guess
RC_PROOF=1 node scripts/audit-cases.mjs runs every case's real filter live and flags the empty, the thin, the drifting — and the bogus, meaning a filter that matched the entire catalogue

That last category is not hypothetical. The provider filter had never worked: packages on JustWatch's TitleFilter matches a provider's short name (nfx), and a technical name (netflix) is not rejected, it is ignored. So "only Netflix" quietly returned all 13,376 Turkish films instead of 4,396, and it looked perfectly fine — every result was a real film and plenty of them were on Netflix. Only counting the rows found it.

Licence and attribution

The source in this repository is MIT licensed — see LICENSE. Use it, fork it, build on it.

That licence covers this project's own code and nothing else, which is worth being precise about because this app is a client for somebody else's catalogue:

Titles, years and runtimes are facts and are not owned by anyone.

Posters are studio copyright. They are fetched from JustWatch at runtime, cached on your own machine, and never redistributed — there is not a single poster in this repository, and the app hosts, streams and proxies no video whatsoever. Every result ends in a link out to a service licensed to show it, which is the entire point of the app.

Availability, watch links and posters come from JustWatch. This is an unofficial personal project. It is not affiliated with, endorsed by, or supported by JustWatch, and it reads an undocumented endpoint that can change or be withdrawn at any time. It is built to be a polite client — a normal evening is about six requests — and it backs off rather than retrying hard when the API says no. Please do not point a scraper at it with this code.

Episode data comes from TVmaze, used under CC BY-SA 4.0.

The reel is descended from LootForge's roller.js. The case artwork is drawn from scratch in SVG (src/js/caseart.js) and contains no third-party assets.

About

Picks one thing to watch tonight out of everything you can actually stream, and hands you the link. Rust + Tauri, no build step, flat-odds cases.

roll-credits-eight.vercel.app

Topics

decision-makerjustwatchmoviespwastreamingtauriwatchlistweb-app

Resources

Readme
License
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.