Add series endpoint parity: /credits, /images, /videos
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

Movies have separate /credits, /images, /videos sub-endpoints; series
only had /seasons. Adds the matching three for series, reusing the
same cast/crew/creators three-way split series detail already does
(extracted into _split_series_credits so both share it).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
NixReaper
2026-09-05 09:52:08 -05:00
co-authored by Claude Sonnet 5
parent 6956bf7406
commit 74adcf77bc
5 changed files with 184 additions and 5 deletions
+38 -1
View File
@@ -12,7 +12,14 @@ from app.api.deps import cached_response, not_found
from app.core.database import get_db
from app.core.redis import get_redis
from app.core.security import enforce_rate_limit
from app.schemas.tv import SeriesDetailOut, SeriesListOut, SeriesSeasonsOut
from app.schemas.tv import (
SeriesCreditsOut,
SeriesDetailOut,
SeriesImagesOut,
SeriesListOut,
SeriesSeasonsOut,
SeriesVideosOut,
)
from app.services import tv_service
from app.services.cache import build_key
@@ -70,3 +77,33 @@ async def get_series_seasons(
return await tv_service.get_series_seasons(session, aurora_id)
except tv_service.SeriesNotFoundError as exc:
raise not_found("series", aurora_id) from exc
@router.get("/{aurora_id}/credits", response_model=SeriesCreditsOut)
async def get_series_credits(
aurora_id: str, session: AsyncSession = Depends(get_db)
) -> SeriesCreditsOut:
try:
return await tv_service.get_series_credits(session, aurora_id)
except tv_service.SeriesNotFoundError as exc:
raise not_found("series", aurora_id) from exc
@router.get("/{aurora_id}/images", response_model=SeriesImagesOut)
async def get_series_images(
aurora_id: str, session: AsyncSession = Depends(get_db)
) -> SeriesImagesOut:
try:
return await tv_service.get_series_images(session, aurora_id)
except tv_service.SeriesNotFoundError as exc:
raise not_found("series", aurora_id) from exc
@router.get("/{aurora_id}/videos", response_model=SeriesVideosOut)
async def get_series_videos(
aurora_id: str, session: AsyncSession = Depends(get_db)
) -> SeriesVideosOut:
try:
return await tv_service.get_series_videos(session, aurora_id)
except tv_service.SeriesNotFoundError as exc:
raise not_found("series", aurora_id) from exc