Fix early filestream close
This commit is contained in:
parent
429e59fb81
commit
3568c5f39b
|
@ -55,7 +55,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
|
|||
var typeName = GetType().Name;
|
||||
Logger.LogInformation("Opening " + typeName + " Live stream from {0}", url);
|
||||
|
||||
using var response = await _httpClientFactory.CreateClient(NamedClient.Default)
|
||||
var response = await _httpClientFactory.CreateClient(NamedClient.Default)
|
||||
.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
|
|
|
@ -1220,11 +1220,11 @@ namespace Jellyfin.Api.Controllers
|
|||
return NotFound();
|
||||
}
|
||||
|
||||
await using var memoryStream = new MemoryStream();
|
||||
await new ProgressiveFileCopier(liveStreamInfo, null, _transcodingJobHelper, CancellationToken.None)
|
||||
.WriteToAsync(memoryStream, CancellationToken.None)
|
||||
.WriteToAsync(Response.Body, CancellationToken.None)
|
||||
.ConfigureAwait(false);
|
||||
return File(memoryStream, MimeTypes.GetMimeType("file." + container));
|
||||
Response.ContentType = MimeTypes.GetMimeType("file." + container);
|
||||
return Ok();
|
||||
}
|
||||
|
||||
private void AssertUserCanManageLiveTv()
|
||||
|
|
Loading…
Reference in New Issue
Block a user