feat(metadata): cast/crew profile photos + filterable production companies#308
Merged
Conversation
Enrich TMDB metadata so the media-detail page can render cast & key crew with profile photos and clickable, filterable production companies. Today profile images are dropped, cast is flattened to bare names, and production companies are never persisted. Additive only — the flat metadata_json['actors'] (names) and 'director' (string) contract keys are untouched (the 'actors shape landmine'); the rich data lands under NEW keys: cast[], crew[], production_companies[], studio. - TmdbProvider: profileUrl()/logoUrl() (w185); movie + TV (aggregate_credits + networks + created_by) emit cast/crew/production_companies; getTvDetails appends production_companies. - Movie/Series resolvers: guarded passthrough of the rich keys. - MediaItemShaper::shapeDetail exposes normalized cast/crew/production_companies /studio (list shape stays lean); defensive normalizers. - ItemRepository + WebPortalRouter: new companies[] filter (JSON_SEARCH over $.production_companies[*].name OR legacy $.studio). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 9 medium |
| Documentation | 5 minor |
| CodeStyle | 25 minor |
| Complexity | 9 medium |
| Comprehensibility | 1 minor |
🟢 Metrics 205 complexity · 0 duplication
Metric Results Complexity 205 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #308 +/- ##
============================================
+ Coverage 58.90% 59.28% +0.37%
- Complexity 12545 12623 +78
============================================
Files 474 474
Lines 41248 41472 +224
============================================
+ Hits 24298 24587 +289
+ Misses 16950 16885 -65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The media-detail page should show cast & key crew with profile photos, and production companies/studios that are clickable to filter the library. Currently TMDB profile images are dropped, cast is flattened to bare names, and production companies aren't persisted at all.
What (all additive — the
actorsflat-names +directorstring contract is untouched)New
metadata_jsonkeys:cast[]({name,role,profile_url}),crew[]({name,job,profile_url}),production_companies[]({name,logo_url,origin_country}),studio.profileUrl()/logoUrl()(w185). Movies emit cast/crew/companies fromcredits+production_companies; TV fromaggregate_credits(+networks,created_by→Creator);getTvDetailsnow appendsproduction_companies.actorsstays flat.cast/crew/production_companies/studio(listshape()stays lean); defensive normalizers tolerate legacy/malformed rows.companies[]filter —JSON_SEARCHover$.production_companies[*].nameOR legacy$.studio, mirroring the actors filter.Profile/logo URLs are stored as full TMDB URLs (same pattern as
poster_url). SPA detail rendering (avatars + clickable studios) lands in the @phlix/ui PR.Tests
New cases across TmdbProvider, both resolvers, MediaItemShaper (incl. legacy/malformed fallbacks + list-shape-stays-lean), ItemRepository (companies SQL/bindings), WebPortalRouter (companies[] forwarded). Full Unit/Media + WebPortal suites green (1001 tests). phpstan L9 clean, phpcs PSR-12 clean.
🤖 Generated with Claude Code