refactor: replace get_stream_url with get_source_uri per ADR-0002
Providers now expose a source URI (for FFmpeg) instead of a viewer-facing stream URL. Playout Service will own transcoding. - Add SourceUri value object (NetworkUrl | FilePath) - Remove StreamQuality, StreamingProtocol from domain - Simplify ProviderCapabilities (drop streaming_protocol, transcode) - Jellyfin: return static direct stream URL - Local files: return absolute file path - Rename use case get_stream_url -> get_source - Stream endpoint returns JSON SourceUri instead of 307 redirect
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use crate::common::enum_to_string;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
pub struct ProviderCapabilitiesResponse {
|
||||
pub collections: bool,
|
||||
@@ -11,9 +9,7 @@ pub struct ProviderCapabilitiesResponse {
|
||||
pub tags: bool,
|
||||
pub decade: bool,
|
||||
pub search: bool,
|
||||
pub streaming_protocol: String,
|
||||
pub rescan: bool,
|
||||
pub transcode: bool,
|
||||
}
|
||||
|
||||
impl From<domain::ports::ProviderCapabilities> for ProviderCapabilitiesResponse {
|
||||
@@ -25,9 +21,7 @@ impl From<domain::ports::ProviderCapabilities> for ProviderCapabilitiesResponse
|
||||
tags: c.tags,
|
||||
decade: c.decade,
|
||||
search: c.search,
|
||||
streaming_protocol: enum_to_string(&c.streaming_protocol),
|
||||
rescan: c.rescan,
|
||||
transcode: c.transcode,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user