@ -52,7 +52,7 @@ namespace Jellyfin.Api.Controllers
private readonly IConfiguration _configuration ;
private readonly IDeviceManager _deviceManager ;
private readonly TranscodingJobHelper _transcodingJobHelper ;
private readonly HttpClient _httpClient ;
private readonly I HttpClientFactory _httpClient Factory ;
private readonly TranscodingJobType _transcodingJobType = TranscodingJobType . Progressive ;
@ -73,7 +73,7 @@ namespace Jellyfin.Api.Controllers
/// <param name="configuration">Instance of the <see cref="IConfiguration"/> interface.</param>
/// <param name="deviceManager">Instance of the <see cref="IDeviceManager"/> interface.</param>
/// <param name="transcodingJobHelper">Instance of the <see cref="TranscodingJobHelper"/> class.</param>
/// <param name="httpClient ">Instance of the <see cref="HttpClient"/> class .</param>
/// <param name="httpClient Factory">Instance of the <see cref="IHttpClientFactory"/> interface .</param>
public VideosController (
ILibraryManager libraryManager ,
IUserManager userManager ,
@ -89,7 +89,7 @@ namespace Jellyfin.Api.Controllers
IConfiguration configuration ,
IDeviceManager deviceManager ,
TranscodingJobHelper transcodingJobHelper ,
HttpClient httpClient )
I HttpClientFactory httpClient Factory )
{
_libraryManager = libraryManager ;
_userManager = userManager ;
@ -105,7 +105,7 @@ namespace Jellyfin.Api.Controllers
_configuration = configuration ;
_deviceManager = deviceManager ;
_transcodingJobHelper = transcodingJobHelper ;
_httpClient = httpClient ;
_httpClient Factory = httpClient Factory ;
}
/// <summary>
@ -465,7 +465,8 @@ namespace Jellyfin.Api.Controllers
{
StreamingHelpers . AddDlnaHeaders ( state , Response . Headers , true , startTimeTicks , Request , _dlnaManager ) ;
return await FileStreamResponseHelpers . GetStaticRemoteStreamResult ( state , isHeadRequest , this , _httpClient ) . ConfigureAwait ( false ) ;
using var httpClient = _httpClientFactory . CreateClient ( ) ;
return await FileStreamResponseHelpers . GetStaticRemoteStreamResult ( state , isHeadRequest , this , httpClient ) . ConfigureAwait ( false ) ;
}
if ( @static . HasValue & & @static . Value & & state . InputProtocol ! = MediaProtocol . File )