Fix movie/series API responses never surfacing company logo_path
CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
movie_service.get_movie_detail() hardcoded companies[].logo_path = None instead of looking up the company's logo artwork, and tv_service's networks[]/companies[] never set logo_path at all -- both just built CompanyBriefOut without the artwork lookup that company_service.py (and _season_brief for posters) already does correctly. Ingestion and storage were working the whole time; the API layer just never read the result. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
2138d4afc3
commit
73488a0d80
@@ -47,6 +47,18 @@ async def get_movie_detail(session: AsyncSession, movie_aurora_id: str) -> Movie
|
||||
|
||||
cast, crew = split_credits(credits_)
|
||||
|
||||
company_out: list[CompanyBriefOut] = []
|
||||
for company, _role in companies:
|
||||
logos = await polymorphic.get_artwork(session, "company", company.id, ArtworkType.LOGO)
|
||||
company_out.append(
|
||||
CompanyBriefOut(
|
||||
id=aurora_id("company", str(company.id)),
|
||||
name=company.name,
|
||||
company_type=company.company_type.value,
|
||||
logo_path=primary_artwork_path(logos, ArtworkType.LOGO),
|
||||
)
|
||||
)
|
||||
|
||||
return MovieDetailOut(
|
||||
id=aurora_id("movie", str(movie.id)),
|
||||
title=movie.title,
|
||||
@@ -67,15 +79,7 @@ async def get_movie_detail(session: AsyncSession, movie_aurora_id: str) -> Movie
|
||||
keywords=[KeywordOut(id=aurora_id("keyword", str(k.id)), name=k.name) for k in keywords],
|
||||
cast=cast,
|
||||
crew=crew,
|
||||
companies=[
|
||||
CompanyBriefOut(
|
||||
id=aurora_id("company", str(company.id)),
|
||||
name=company.name,
|
||||
company_type=company.company_type.value,
|
||||
logo_path=None,
|
||||
)
|
||||
for company, _role in companies
|
||||
],
|
||||
companies=company_out,
|
||||
collection=(
|
||||
CollectionBriefOut(
|
||||
id=aurora_id("collection", str(movie.collection.id)), name=movie.collection.name
|
||||
|
||||
Reference in New Issue
Block a user