Expose certifications and per-country release dates
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

TMDb's release_dates/content_ratings blocks were already fetched via
append_to_response but discarded at normalization -- every downstream
layer (ingestion write, repository read, schema, service) was unbuilt.
Adds the full pipeline: NormalizedReleaseDate + get_or_create_certification,
a shared polymorphic sync/read (movie and series both use it), and
MovieDetailOut/SeriesDetailOut certification + release_dates fields.

Series content_ratings has no date of its own, so each rating is anchored
to the show's first_air_date with release_type="tv".

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
NixReaper
2026-09-06 04:07:18 -05:00
co-authored by Claude Sonnet 5
parent 340cadd99d
commit e1a36ce227
15 changed files with 510 additions and 5 deletions
+5
View File
@@ -13,6 +13,7 @@ from app.schemas.common import (
GenreOut,
ImagesOut,
KeywordOut,
ReleaseDateOut,
VideoOut,
)
@@ -54,6 +55,9 @@ class SeriesDetailOut(BaseModel):
popularity: float | None = None
vote_average: float | None = None
vote_count: int | None = None
# The US TV rating (e.g. "TV-MA") -- convenience pick out of
# `release_dates` below, same as MovieDetailOut.certification.
certification: str | None = None
genres: list[GenreOut] = []
keywords: list[KeywordOut] = []
@@ -65,6 +69,7 @@ class SeriesDetailOut(BaseModel):
seasons: list[SeasonBriefOut] = []
images: ImagesOut = ImagesOut()
videos: list[VideoOut] = []
release_dates: list[ReleaseDateOut] = []
external_ids: dict[str, str] = {}
created_at: datetime