tracker
All repositories: gitoria
2.5 KB
# Mission 003 (old 044) — tracker.worldapi.org#9: TMDB sync (new episodes + posters)Ticket: `curl -s -H 'Accept: text/markdown' https://tickets.worldapi.org/api/projects/tracker.worldapi.org/tickets/9`Setup and rules exactly as mission 002 (old 041) (`missions/002-tracker-my-pages.md`, incl. the real-data check on a Loreanacopy) — read it. App: loreana:/media/STORAGE/projects/tracker.worldapi.org.## Build1. A sync in Hybriel (hl:fetch) that, for every show SOMEONE FOLLOWS (not all 9,453), fetches from TMDB(api.themoviedb.org/3, `Authorization: Bearer $TMDB_READ_TOKEN` from the app's env — the dev `.env` already hasTMDB_READ_TOKEN and TMDB_API_KEY; never print or copy them): show details, seasons, episodes. New seasons/episodes areadded, existing ones updated (title, summary, release) — matched by tmdbId, never duplicated; nothing is deleted.Reference for the API calls: /media/STORAGE/projects/old-tracker/crates/sync/commands/sync.js (read-only).2. Posters: download each followed show's poster (TMDB `poster_path`, size w342) into `storage/posters/` (in storage →in the nightly backup), served by the existing `/posters/…` route; the placeholder stays for shows without one.3. Runs: a tool `tools/sync-tmdb.hl` (idempotent, prints counts; `--limit N` for tests) AND automatically inside theapp once a day (e.g. 04:00 via the framework's timers) without blocking requests — the server serves one request at atime (see mission 002 (old 041)), so the sync must yield between shows, and never run during a page render. Respect TMDB ratelimits (≤ 40 requests / 10 s).4. After a sync /my/schedule shows upcoming episodes and /my/unwatched the newly released ones.5. Gate: extend tests/browser.mjs with a FAKE TMDB (a tiny local HTTP server in the test serving fixed JSON + a png;point the app at it via an env var like TMDB_BASE_URL) — no real TMDB calls in the gate. All green.## Real-data proof (on the Loreana copy, mission 002 (old 041) procedure)Run `tools/sync-tmdb.hl` against the COPY with the real TMDB (limit to the creator's 128 followed shows): report counts(shows, new seasons, new episodes, posters), duration, TMDB errors; then load /my/schedule, /my/shows, one show page as`az5b2` in the copy: times + screenshots (LOOK at them; posters must appear). Delete the copy afterwards.## Report (short)Files, decisions, gate command + last line, the real-data numbers + page times, screenshot paths(/tmp/w044-real/ on Loreana), how the daily run is scheduled, open points, Hybriel issues.Ports 8720–8731.
Branches
Latest commits
- 94f8a373gc1: back out the kept episode-id set (no measurable gain on /my/unwatched: 4.69 -> 4.61 GB per 150 loads)mre
- a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
- cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre
- 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre
- ddb4127egc1: TRACKER_QSTATS=1 logs queue and cache sizes every 10 s (measurement only)mre
- da60547fstatus: GC1 done, backup bugmre
- e4171021log: GC1 result, backup hard-link bugmre
- f1597214deploy.sh backup: tar --hard-dereference (hot tar stored mpackdb sidecars as hard links to .sessions files)mre
- 6b58571elog: GC windowmre
- 5c8baa1fdeploy lock: hold only around deploy.shmre
- b8dac822log: hybriel#309mre
- bf676d9elog: GC1 startedmre
- c7828541mission GC1mre
- ef949994conductor: neutral ticket rulemre
- 89e91ef3log: RV39 livemre
- ee2b677alog: RV39 deployingmre
- c1c4178cMerge branch 'rv39'mre
- a016e9abReapply "Merge branch 'rv39'"mre
- f29e2502log: RV39 gate fixmre
- d9fce111browser gate #26: exact frame count incl. SL1 people step (hybriel#308)mre