//! HTTP surface (§4). Base path `/api/v1`, JSON throughout. pub mod exists; pub mod federation; pub mod fetch; pub mod json; pub mod report; pub mod upload; use serde::Deserialize; use crate::matching::ClientCut; /// Identity + cut query parameters, shared by the read endpoints (§4). #[derive(Debug, Clone, Default, Deserialize)] pub struct LookupParams { pub tmdb_id: Option, pub imdb_id: Option, pub series_tmdb_id: Option, pub series_imdb_id: Option, pub season: Option, pub episode: Option, pub runtime_sec: Option, pub video_hash: Option, } impl LookupParams { pub fn client_cut(&self) -> ClientCut { ClientCut { // A non-finite or non-positive runtime is not a usable signal; treat // it as absent rather than letting it drive a match. runtime_sec: self.runtime_sec.filter(|r| r.is_finite() && *r > 0.0), video_hash: self.video_hash.clone(), } } }