Prechádzať zdrojové kódy

- ensure the proper StartTimeTicks variable is forwarded to the AddDlnaHeaders function

Marius Luca 3 rokov pred
rodič
commit
4e0edaf544

+ 3 - 3
Jellyfin.Api/Controllers/VideosController.cs

@@ -451,7 +451,7 @@ namespace Jellyfin.Api.Controllers
 
 
             if (@static.HasValue && @static.Value && state.DirectStreamProvider != null)
             if (@static.HasValue && @static.Value && state.DirectStreamProvider != null)
             {
             {
-                StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, startTimeTicks, Request, _dlnaManager);
+                StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, state.Request.StartTimeTicks, Request, _dlnaManager);
 
 
                 var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfo(streamingRequest.LiveStreamId);
                 var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfo(streamingRequest.LiveStreamId);
                 if (liveStreamInfo == null)
                 if (liveStreamInfo == null)
@@ -467,7 +467,7 @@ namespace Jellyfin.Api.Controllers
             // Static remote stream
             // Static remote stream
             if (@static.HasValue && @static.Value && state.InputProtocol == MediaProtocol.Http)
             if (@static.HasValue && @static.Value && state.InputProtocol == MediaProtocol.Http)
             {
             {
-                StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, startTimeTicks, Request, _dlnaManager);
+                StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, state.Request.StartTimeTicks, Request, _dlnaManager);
 
 
                 var httpClient = _httpClientFactory.CreateClient(NamedClient.Default);
                 var httpClient = _httpClientFactory.CreateClient(NamedClient.Default);
                 return await FileStreamResponseHelpers.GetStaticRemoteStreamResult(state, isHeadRequest, httpClient, HttpContext).ConfigureAwait(false);
                 return await FileStreamResponseHelpers.GetStaticRemoteStreamResult(state, isHeadRequest, httpClient, HttpContext).ConfigureAwait(false);
@@ -484,7 +484,7 @@ namespace Jellyfin.Api.Controllers
             var transcodingJob = _transcodingJobHelper.GetTranscodingJob(outputPath, TranscodingJobType.Progressive);
             var transcodingJob = _transcodingJobHelper.GetTranscodingJob(outputPath, TranscodingJobType.Progressive);
             var isTranscodeCached = outputPathExists && transcodingJob != null;
             var isTranscodeCached = outputPathExists && transcodingJob != null;
 
 
-            StreamingHelpers.AddDlnaHeaders(state, Response.Headers, (@static.HasValue && @static.Value) || isTranscodeCached, startTimeTicks, Request, _dlnaManager);
+            StreamingHelpers.AddDlnaHeaders(state, Response.Headers, (@static.HasValue && @static.Value) || isTranscodeCached, state.Request.StartTimeTicks, Request, _dlnaManager);
 
 
             // Static stream
             // Static stream
             if (@static.HasValue && @static.Value)
             if (@static.HasValue && @static.Value)