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:
@@ -4,10 +4,8 @@ use async_trait::async_trait;
|
||||
|
||||
use domain::errors::DomainResult;
|
||||
use domain::models::MediaItem;
|
||||
use domain::ports::{
|
||||
Collection, IProviderRegistry, ProviderCapabilities, SeriesSummary, StreamQuality,
|
||||
StreamingProtocol,
|
||||
};
|
||||
use domain::ports::{Collection, IProviderRegistry, ProviderCapabilities, SeriesSummary};
|
||||
use domain::SourceUri;
|
||||
use domain::testing::{InMemoryLibraryRepository, NoopEventPublisher, NoopLibrarySync};
|
||||
use domain::value_objects::{ContentType, MediaFilter, MediaItemId};
|
||||
|
||||
@@ -29,11 +27,7 @@ impl IProviderRegistry for TestProviderRegistry {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
async fn get_stream_url(
|
||||
&self,
|
||||
_item_id: &MediaItemId,
|
||||
_quality: &StreamQuality,
|
||||
) -> DomainResult<String> {
|
||||
async fn get_source_uri(&self, _item_id: &MediaItemId) -> DomainResult<SourceUri> {
|
||||
Err(domain::DomainError::InfrastructureError(
|
||||
"TestProviderRegistry does not support streaming".into(),
|
||||
))
|
||||
@@ -55,9 +49,7 @@ impl IProviderRegistry for TestProviderRegistry {
|
||||
tags: false,
|
||||
decade: false,
|
||||
search: true,
|
||||
streaming_protocol: StreamingProtocol::Hls,
|
||||
rescan: false,
|
||||
transcode: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user