gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commite55b379de55b379dKeep shared app title independent of the route import graphmree55b379d/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

  • e55b379dKeep shared app title independent of the route import graphmre
  • 85fa6c9blog: CB68 result, CB69 startedmre
  • 2f07c1b7log: DP68 boot gate failed, CB68mre
  • 9652782dlog: HM59 merged, DP68 startedmre
  • 29867a75Merge hm59-logic: tracker#59 page logic moved to libmre
  • f7bfe90bMove remaining page builders into their topicsmre
  • 7c3991f9log: day46 from Antonmre
  • ec54fc35Move show page logic into the shows topicmre
  • c1a8d074log: correct timesmre
  • 5827eba9log: HM57 merged, HM59 startedmre
  • d1a91be9Merge hm57-let: tracker#57 let only for reassigned namesmre
  • a404ed75Report HM57 audit, gates and integration notesmre
  • 1dcb87a7Use plain declarations for unchanged bindingsmre
  • b90395e3log: HM51 mergedmre
  • 9888d076Merge hm51-classes: tracker#51 views use Style referencesmre
  • 4399bc2fReference remaining component-owned root Style rulesmre
  • 9edcc2dflog: #58 live, HM57 startedmre
  • 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre
  • aed12917Reference owned Style rules in genres and searchmre
  • 14195720log: HM49B done, HM51 startedmre