goon/app
goon-foss b9898ba592 feat(movies): TPDB movie enrichment + dedup
Enrich existing movies (from paradisehill/dooplay, which mostly lack cast)
with metadata from TPDB's /movies API: cast, categories (tags), studio,
director + a canonical TPDB UUID for dedup. Chosen over IAFD after a
source-comparison research pass — IAFD has strong cast/studio but ZERO
categories, while TPDB /movies has ~11 tags/movie, cast, studio, director,
a canonical UUID (+ sparse phash), is already an integrated API (no
scraping/anti-bot), and covers ~75-85% of our western-DVD-feature catalog.

Enrichment only ever augments EXISTING movies and never creates new ones
(TPDB has no playback, so a standalone TPDB movie would be unplayable).
Writes to movie_performers / movie_tags / movie.studio_id, which the movies
API + mobile detail already render, so no schema/API/UI change is needed.

- connectors/tpdb.py: search_movies() + fetch_movie() + _parse_movie()
  reusing the existing _parse_studio/_parse_performer/_parse_tag.
- enrich/tpdb_movies.py: match our movie to a TPDB /movies result by
  token_sort_ratio on normalized titles (sort, not set, to reject the
  short-title-subset trap "Fantasies" -> "Tara's Fetish Fantasies") with a
  +/-2yr guard; then attach cast/tags/studio/director. Incoming performers
  deduped by external_id to avoid the performer_external_refs PK clash.
- resolve/movie_merge.py: merge_movies() mirror of scene_merge; two of our
  movies mapping to the same TPDB UUID are the same film -> merge.
- scheduler: _job_tpdb_movie_enrich every 6h, batch 200, prioritizing
  playable movies missing cast/studio.

Verified on a 150-movie batch: 119 enriched, 4 deduped, 26 no-match,
0 errors; matched titles/studios spot-checked correct (Big Butts Drive Me
Nuts 4 -> 33 tags, Seinfeld #2 -> 10 cast/17 tags, German BB Video titles
-> categories+studio).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 11:36:36 +02:00
..
api refactor(review): dedup favorites/list visibility + SQL-aggregate count, share mobile isNew 2026-07-02 09:41:37 +02:00
connectors feat(movies): TPDB movie enrichment + dedup 2026-07-02 11:36:36 +02:00
enrich feat(movies): TPDB movie enrichment + dedup 2026-07-02 11:36:36 +02:00
extractors chore(ingest): hard-remove hqfap + 4k69 (entire CDN library gone) 2026-06-25 11:07:47 +02:00
models fix(favorites): exclude bulk-backfill scenes from "+N new" (tube fake dates) 2026-07-01 16:04:01 +02:00
normalize feat(ingest): SQL phash match, tag inference + backfill, clip-store skip, browse tubes, watchdog 2026-06-01 15:07:35 +02:00
resolve feat(movies): TPDB movie enrichment + dedup 2026-07-02 11:36:36 +02:00
scheduler feat(movies): TPDB movie enrichment + dedup 2026-07-02 11:36:36 +02:00
templates feat(seo): public HTML SEO router + templates; add CLAUDE.md; ignore .nimbalyst 2026-05-31 16:29:59 +02:00
__init__.py Initial commit 2026-05-20 10:10:22 +02:00
auth.py Initial commit 2026-05-20 10:10:22 +02:00
config.py feat(movies): TPDB movie enrichment + dedup 2026-07-02 11:36:36 +02:00
db.py Initial commit 2026-05-20 10:10:22 +02:00
ingest.py fix(favorites): exclude bulk-backfill scenes from "+N new" (tube fake dates) 2026-07-01 16:04:01 +02:00
main.py feat(sources): 0-5★ ranking on Sites (freshness/metadata/plays) + playback telemetry 2026-06-22 10:00:59 +02:00