Use proper IHttpContextAccessor

This commit is contained in:
crobibero
2020-08-10 07:53:32 -06:00
parent 460c3dd351
commit c5e9cf15f6
8 changed files with 59 additions and 60 deletions

View File

@@ -471,7 +471,7 @@ namespace Jellyfin.Api.Controllers
StreamingHelpers.AddDlnaHeaders(state, Response.Headers, true, startTimeTicks, Request, _dlnaManager);
using var httpClient = _httpClientFactory.CreateClient();
return await FileStreamResponseHelpers.GetStaticRemoteStreamResult(state, isHeadRequest, this, httpClient).ConfigureAwait(false);
return await FileStreamResponseHelpers.GetStaticRemoteStreamResult(state, isHeadRequest, httpClient, HttpContext).ConfigureAwait(false);
}
if (@static.HasValue && @static.Value && state.InputProtocol != MediaProtocol.File)
@@ -507,7 +507,7 @@ namespace Jellyfin.Api.Controllers
state.MediaPath,
contentType,
isHeadRequest,
this);
HttpContext);
}
// Need to start ffmpeg (because media can't be returned directly)
@@ -517,10 +517,9 @@ namespace Jellyfin.Api.Controllers
return await FileStreamResponseHelpers.GetTranscodedFile(
state,
isHeadRequest,
this,
HttpContext,
_transcodingJobHelper,
ffmpegCommandLineArguments,
Request,
_transcodingJobType,
cancellationTokenSource).ConfigureAwait(false);
}