gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit3e3d5a553e3d5a55mission ST1: stall diagnosismre3e3d5a55/missions/003-tracker-tmdb-sync.md

2.5 KB

  1. # Mission 003 (old 044) — tracker.worldapi.org#9: TMDB sync (new episodes + posters)
  2. Ticket: `curl -s -H 'Accept: text/markdown' https://tickets.worldapi.org/api/projects/tracker.worldapi.org/tickets/9`
  3. Setup and rules exactly as mission 002 (old 041) (`missions/002-tracker-my-pages.md`, incl. the real-data check on a Loreana
  4. copy) — read it. App: loreana:/media/STORAGE/projects/tracker.worldapi.org.
  5. ## Build
  6. 1. A sync in Hybriel (hl:fetch) that, for every show SOMEONE FOLLOWS (not all 9,453), fetches from TMDB
  7. (api.themoviedb.org/3, `Authorization: Bearer $TMDB_READ_TOKEN` from the app's env — the dev `.env` already has
  8. TMDB_READ_TOKEN and TMDB_API_KEY; never print or copy them): show details, seasons, episodes. New seasons/episodes are
  9. added, existing ones updated (title, summary, release) — matched by tmdbId, never duplicated; nothing is deleted.
  10. Reference for the API calls: /media/STORAGE/projects/old-tracker/crates/sync/commands/sync.js (read-only).
  11. 2. Posters: download each followed show's poster (TMDB `poster_path`, size w342) into `storage/posters/` (in storage →
  12. in the nightly backup), served by the existing `/posters/…` route; the placeholder stays for shows without one.
  13. 3. Runs: a tool `tools/sync-tmdb.hl` (idempotent, prints counts; `--limit N` for tests) AND automatically inside the
  14. app once a day (e.g. 04:00 via the framework's timers) without blocking requests — the server serves one request at a
  15. time (see mission 002 (old 041)), so the sync must yield between shows, and never run during a page render. Respect TMDB rate
  16. limits (≤ 40 requests / 10 s).
  17. 4. After a sync /my/schedule shows upcoming episodes and /my/unwatched the newly released ones.
  18. 5. Gate: extend tests/browser.mjs with a FAKE TMDB (a tiny local HTTP server in the test serving fixed JSON + a png;
  19. point the app at it via an env var like TMDB_BASE_URL) — no real TMDB calls in the gate. All green.
  20. ## Real-data proof (on the Loreana copy, mission 002 (old 041) procedure)
  21. Run `tools/sync-tmdb.hl` against the COPY with the real TMDB (limit to the creator's 128 followed shows): report counts
  22. (shows, new seasons, new episodes, posters), duration, TMDB errors; then load /my/schedule, /my/shows, one show page as
  23. `az5b2` in the copy: times + screenshots (LOOK at them; posters must appear). Delete the copy afterwards.
  24. ## Report (short)
  25. Files, decisions, gate command + last line, the real-data numbers + page times, screenshot paths
  26. (/tmp/w044-real/ on Loreana), how the daily run is scheduled, open points, Hybriel issues.
  27. Ports 8720–8731.

Branches

Latest commits

  • 3e3d5a55mission ST1: stall diagnosismre
  • 9c3180eblog+status: RV28d measured after deploymre
  • fdf10b1alog: RV28d deployed on day38bmre
  • 320005e9log: RV28d merged, deploy runningmre
  • a8fef27dRV28d: reportmre
  • 2bae8373RV28d: re-vendor Hybriel set day38b (source 1e554d75, bin 5ff2a46d)mre
  • 16b3354aMerge branch 'main' into rv28cmre
  • 6f4f27d8log: RV28d started (day38b)mre
  • e6cf03ffmission RV28d: rv28c onto day38bmre
  • 3ccaee19status: live sweep freeze, waiting for Apollomre
  • 49f76ecblog: watch toggle slowness = session sweep freeze (tracker#50)mre
  • 3daf6eddlog: day37 live, still waiting for day39mre
  • 796ba672records: #277 slips to day39mre
  • a9eb9827records: mpackdb integrity clean, all 12 tablesmre
  • 6cf40dbdrecords: mpackdb integrity check, shows uncheckedmre
  • 1880f42arecords: day38 deploy may swap normallymre
  • 9d806e35records: mpackdb freeze until day38mre
  • a660239drecords: day37 lacks #277, wait for day38mre
  • b0abfdeaLOG: Anton hybriel#277 fix ready for day37mre
  • 7b5b2918Tracker: hybriel#277 fix comes in day37mre