Add movie/series ratings and watchlist

Builds on the accounts foundation: PUT/DELETE a rating (0.5-10.0) or a
watchlist entry on any movie or series, all scoped to the bearer token's
own user, plus GET /account/ratings|watchlist/{movies,series} to list
them back. Both are polymorphic entity_type/entity_id tables, same shape
as watch_provider_offerings and trending_entries, so movie and series
share one repository/router each rather than duplicating per type.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
NixReaper
2026-09-06 10:47:41 -05:00
co-authored by Claude Sonnet 5
parent a38c2074a6
commit 0ab31a314c
20 changed files with 1043 additions and 6 deletions
+12
View File
@@ -14,6 +14,7 @@ from app.models.genre import Genre, MovieGenre
from app.models.movie import Movie
from app.models.person import Person
from app.models.provider import Provider
from app.models.tv import Series
from app.repositories.provider_repository import get_or_create_provider
@@ -81,3 +82,14 @@ async def make_movie(
def movie_aurora_id(movie: Movie) -> str:
return aurora_id("movie", str(movie.id))
async def make_series(session: AsyncSession, *, title: str = "The Wire") -> Series:
series = Series(title=title, sort_title=title, overview="Baltimore, drugs, and wiretaps.")
session.add(series)
await session.flush()
return series
def series_aurora_id(series: Series) -> str:
return aurora_id("series", str(series.id))