Add GET /genres directory endpoint
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

GET /movies and GET /series accept a genre filter (an Aurora genre id),
but nothing exposed what those ids actually are -- genres otherwise
only ever appear embedded in a movie/series response's own genres
list. This is the resolve-by-name-first-then-filter step the frontend
needs to build real genre browsing.

No filter, no sort_by -- always alphabetical by name, same pattern as
collections/companies (genres have no categorical field or popularity/
date to sort by). page_size defaults to 50 (max 200) rather than the
20/50 used elsewhere, since genres are a small, fixed reference set
(TMDb has ~19-20 total) a client typically wants in full for a filter
dropdown, not paginated like a catalog of millions of movies.

Also fixed two stale "behind Traefik" mentions in app/main.py's module
docstring while touching this file, left over from the earlier
cPanel/host-webserver deployment change.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
NixReaper
2026-09-06 00:05:10 -05:00
co-authored by Claude Sonnet 5
parent 71388e254e
commit 340cadd99d
7 changed files with 179 additions and 4 deletions
+17 -3
View File
@@ -178,9 +178,23 @@ date field to sort by, so results are always alphabetical by name.
`GET /api/v1/collections` is the same idea for collections/franchises, but
with no filter at all (no categorical field like `company_type` exists for
a collection) — just `page`/`page_size`, always alphabetical by name. This
is the last entity type to get a browse endpoint: movies, series, people,
companies, and collections are all browsable now.
a collection) — just `page`/`page_size`, always alphabetical by name.
## Genres
| Method | Path |
|---|---|
| GET | `/api/v1/genres` |
A directory for the `genre` filter `GET /movies` and `GET /series` already
accept, which takes an Aurora genre id — this is how a client discovers
what those ids actually are, since nothing else exposes them on their own
(they otherwise only ever appear embedded in a movie/series response's own
`genres` list). No filter, no `sort_by` — always alphabetical by name, same
as collections. `page_size` defaults to 50 (max 200) rather than the 20/50
used elsewhere, since genres are a small, fixed reference set (TMDb has
~19-20 total) that a client typically wants in full for a filter dropdown,
not paginated the way a catalog of millions of movies needs to be.
Collection detail's `movies` list only includes movies already ingested
into Aurora — `POST /api/v1/admin/ingest/collection` links a franchise's