feat: enhance Jellyfin stream URL generation and improve NumberInput component

This commit is contained in:
2026-03-11 19:44:48 +01:00
parent 8d8d320a02
commit c9aa36bb5f
2 changed files with 15 additions and 8 deletions

View File

@@ -153,13 +153,15 @@ impl IMediaProvider for JellyfinMediaProvider {
Ok(body.items.into_iter().next().and_then(map_jellyfin_item))
}
/// Build a direct-play stream URL for a Jellyfin item.
/// Build a stream URL for a Jellyfin item.
///
/// Uses `static=true` to request the original file without transcoding.
/// The API key is embedded in the URL so the player does not need separate auth.
/// Requests H.264 video + AAC audio in an MP4 container so that all
/// major browsers can play it natively. Jellyfin will direct-play if the
/// source already matches; otherwise it transcodes on the fly.
/// The API key is embedded in the URL so the player needs no separate auth.
async fn get_stream_url(&self, item_id: &MediaItemId) -> DomainResult<String> {
Ok(format!(
"{}/Videos/{}/stream?static=true&api_key={}",
"{}/Videos/{}/stream?videoCodec=h264&audioCodec=aac&container=mp4&api_key={}",
self.config.base_url,
item_id.as_ref(),
self.config.api_key,