feat(api): resolve trailer chips by TMDB id

This commit is contained in:
Miguel Palhas
2026-08-23 22:03:04 +01:00
parent 9bd037d1b6
commit 80a63ea2e1
4 changed files with 215 additions and 1 deletions
+4
View File
@@ -14,6 +14,7 @@ mod roots;
mod search;
mod series;
mod state;
mod trailer;
use axum::routing::get;
use axum::{Json, Router};
@@ -39,6 +40,7 @@ pub use series::{
pub use state::{
AppState, EpisodeCommand, MovieCommand, SeasonCommand, Upstreams, DEFAULT_TMDB_URL,
};
pub use trailer::{Trailer, TrailerKind};
/// 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.
@@ -99,6 +101,7 @@ fn api_router() -> OpenApiRouter<AppState> {
.routes(routes!(owners::get, owners::update, owners::delete))
.routes(routes!(search::search))
.routes(routes!(search::releases))
.routes(routes!(trailer::trailer))
.routes(routes!(roots::list, roots::create))
.routes(routes!(roots::get, roots::update, roots::delete))
.routes(routes!(policies::list, policies::create))
@@ -326,6 +329,7 @@ mod tests {
"post",
),
("/api/queues/attention", "get"),
("/api/trailer", "get"),
("/api/series", "get"),
("/api/policies", "get"),
("/api/policies", "post"),