Fix build error: correct StreamingRequestDto cast

The previous commit referenced state.Request.SegmentContainer which doesn't
exist. BaseEncodingJobOptions doesn't have a SegmentContainer property - only
StreamingRequestDto does.

Fixed by:
- Cast BaseRequest to StreamingRequestDto before accessing SegmentContainer
- Add using directive for MediaBrowser.Controller.Streaming namespace
- Use null-conditional operator to safely check SegmentContainer
This commit is contained in:
mani
2026-01-08 00:54:26 +01:00
parent a2f0eef49b
commit 60f8a22b26

View File

@@ -20,6 +20,7 @@ using Jellyfin.Extensions;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Extensions;
using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Streaming;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
@@ -7484,7 +7485,8 @@ namespace MediaBrowser.Controller.MediaEncoding
{
// Use fragmented MP4 for adaptive streaming (HLS/DASH with segments)
// Use faststart for progressive downloads (better seeking and metadata)
if (!string.IsNullOrEmpty(state.Request.SegmentContainer))
var streamingRequest = state.BaseRequest as StreamingRequestDto;
if (streamingRequest?.SegmentContainer is not null)
{
// Fragmented MP4 for HLS/DASH
format = " -f mp4 -movflags frag_keyframe+empty_moov+delay_moov";