Add watch providers (where to stream/rent/buy)
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

New TMDb integration end to end: append_to_response "watch/providers",
normalizer parsing grouped by country/monetization type, a WatchProvider
catalog entry (external-id keyed, same get_or_create pattern as Company/
Collection/Person) + polymorphic WatchProviderOffering table (new
migration 0002), ingestion write (including provider logos via the
existing Artwork table), and API exposure -- embedded on movie/series
detail plus a dedicated /watch-providers sub-route, shaped to mirror
TMDb's own response for easy porting.

Note: this data comes from JustWatch via TMDb and carries its own
attribution requirement separate from TMDb's general one -- flagged in
docs/api.md, must be satisfied before showing this in the frontend.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
NixReaper
2026-09-06 04:59:02 -05:00
co-authored by Claude Sonnet 5
parent 74ebad379a
commit 6c95e18aad
21 changed files with 767 additions and 2 deletions
+7
View File
@@ -17,6 +17,7 @@ from app.schemas.common import (
KeywordOut,
ReleaseDateOut,
VideoOut,
WatchProviderRegionOut,
)
@@ -66,12 +67,18 @@ class MovieDetailOut(BaseModel):
images: ImagesOut = ImagesOut()
videos: list[VideoOut] = []
release_dates: list[ReleaseDateOut] = []
watch_providers: dict[str, WatchProviderRegionOut] = {}
external_ids: dict[str, str] = {}
created_at: datetime
updated_at: datetime
class MovieWatchProvidersOut(BaseModel):
id: str
results: dict[str, WatchProviderRegionOut] = {}
class MovieCreditsOut(BaseModel):
id: str
cast: list[CastCreditOut] = []