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
- 2047955bMerge branch 'u12-gateports' into mainTracker
- 4e018678|||PR deploy.sh: gates use Tracker's ports 8716-8719 and LC_ALL=C; README: 2 backups keptTracker
- 0b86324aMerge branch 'records-dp73' into mainTracker
- 9ce5f59b|||PR records: DP73 live 613ae0e; deploy.sh keeps 2 backupsTracker
- 613ae0ecMerge branch 'bs3' into mainTracker
- 1383264b|||PR BS3: keep shared synchronous sorting fastTracker
- 63e5ba1a|||PR BS3: guard boot imports and share resumable sort buffersTracker
- 310613f1Merge branch 'records-dp72' into mainTracker
- 6f7b61ba|||PR records: deploy-swap fix live, Kunibert findingsTracker
- c41587d2Merge branch 'bs2' into mainTracker
- 0dd538a6|||PR BS2: finish the boot index in slices so a booting instance keeps answeringTracker
- 019d5cedMerge branch 'records-1110' into mainTracker
- f88ae8b9|||PR records: day56 toggle live, reviewTracker
- b6b3bb4dMerge branch 'ap56e' into mainTracker
- 29a26da9|||PR AP56e: guard hidden show helpers during session syncTracker
- 7c9ec236|||PR AP56e: re-vendor Hybriel set day56 (source 36ae83a8, bin c1f595a2)Tracker
- 4b54f6f9Merge branch 'records-audit' into mainTracker
- cab4a3bc|||PR records: branch audit, PR-onlyTracker
- 641e1c4cMerge branch 'records-dp71' into mainTracker
- 85a6e9f5|||PR records: DP71 checked in ChromeTracker