feat(api): series, season and episode endpoints (#81)
ci / web (push) Successful in 26s
e2e / e2e (push) Successful in 47s
ci / rust (push) Successful in 2m39s

This commit was merged in pull request #81.
This commit is contained in:
2026-08-22 23:02:34 +01:00
parent e650a762f9
commit d3cea8693b
34 changed files with 2762 additions and 21 deletions
+17 -1
View File
@@ -11,6 +11,7 @@ mod movies;
mod owners;
mod roots;
mod search;
mod series;
mod state;
use axum::routing::get;
@@ -25,7 +26,11 @@ pub use movies::{Accepted, AttentionQueues, CreateMovie, ErrorBody, Movie, Relea
pub use owners::{CreateOwner, Owner, UpdateOwner};
pub use roots::Root;
pub use search::{ClassifiedRelease, SearchResponse};
pub use state::{AppState, MovieCommand, Upstreams, DEFAULT_TMDB_URL};
pub use series::{
CreateEpisode, CreateSeason, CreateSeries, Episode, Season, Series, UpdateEpisode,
UpdateSeason, UpdateSeries,
};
pub use state::{AppState, EpisodeCommand, MovieCommand, Upstreams, DEFAULT_TMDB_URL};
/// Where the generated document is served, and where `just gen-client` reads
/// it back from when it is fetched rather than dumped from the binary.
@@ -46,6 +51,7 @@ pub const DOCS_PATH: &str = "/api/docs";
tags(
(name = "system", description = "Service health and metadata"),
(name = "movies", description = "Movie library and actions"),
(name = "series", description = "Series, seasons and episodes (DESIGN.md §4.1, §4.2)"),
(name = "owners", description = "Owner tags and filtered views (DESIGN.md §4.3)"),
(name = "search", description = "Unified title and release search"),
(name = "roots", description = "Root folders and their policies")
@@ -65,6 +71,16 @@ fn api_router() -> OpenApiRouter<AppState> {
.routes(routes!(movies::attention))
.routes(routes!(movies::list_owners))
.routes(routes!(movies::tag_owner, movies::untag_owner))
.routes(routes!(series::list, series::create))
.routes(routes!(series::get, series::update, series::delete))
.routes(routes!(series::seasons, series::create_season))
.routes(routes!(series::update_season))
.routes(routes!(series::get_episode, series::update_episode))
.routes(routes!(series::search_episode))
.routes(routes!(series::episode_releases))
.routes(routes!(series::grab_episode))
.routes(routes!(series::list_owners))
.routes(routes!(series::tag_owner, series::untag_owner))
.routes(routes!(owners::list, owners::create))
.routes(routes!(owners::get, owners::update, owners::delete))
.routes(routes!(search::search))