aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/LiveTvController.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2021-08-30 20:02:31 +0200
committerGitHub <noreply@github.com>2021-08-30 20:02:31 +0200
commitae031fdd28cac50a50e6713d64fa92ddd496aaf2 (patch)
treeb14410bc8873ec1c532ad2bab31ec1a65c29afa8 /Jellyfin.Api/Controllers/LiveTvController.cs
parenta84dc794c6960a8a6e1dc0660e15a030e0f51305 (diff)
parent442e756395c69cf001e2bafa6512e82a79d04c6b (diff)
Merge branch 'master' into tonemap-overlay
Diffstat (limited to 'Jellyfin.Api/Controllers/LiveTvController.cs')
-rw-r--r--Jellyfin.Api/Controllers/LiveTvController.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs
index 24ee833ef..47ebe9f57 100644
--- a/Jellyfin.Api/Controllers/LiveTvController.cs
+++ b/Jellyfin.Api/Controllers/LiveTvController.cs
@@ -1172,7 +1172,7 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesVideoFile]
- public async Task<ActionResult> GetLiveRecordingFile([FromRoute, Required] string recordingId)
+ public ActionResult GetLiveRecordingFile([FromRoute, Required] string recordingId)
{
var path = _liveTvManager.GetEmbyTvActiveRecordingPath(recordingId);
@@ -1181,11 +1181,8 @@ namespace Jellyfin.Api.Controllers
return NotFound();
}
- await using var memoryStream = new MemoryStream();
- await new ProgressiveFileCopier(path, null, _transcodingJobHelper, CancellationToken.None)
- .WriteToAsync(memoryStream, CancellationToken.None)
- .ConfigureAwait(false);
- return File(memoryStream, MimeTypes.GetMimeType(path));
+ var stream = new ProgressiveFileStream(path, null, _transcodingJobHelper);
+ return new FileStreamResult(stream, MimeTypes.GetMimeType(path));
}
/// <summary>