diff options
| author | cvium <clausvium@gmail.com> | 2021-11-08 10:38:08 +0100 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2021-11-08 10:38:08 +0100 |
| commit | f03e77a4d5fa0ca81ecb11f0ffc4c14706a6dd7d (patch) | |
| tree | 06ae22d6e13ac26ab9dcb97e54591ad55654d3e1 /Jellyfin.Api/Controllers/LiveTvController.cs | |
| parent | 153e9202397f236a4a415bd033c3b398b6e6573c (diff) | |
| parent | 83859a1e6d96cbb60a3b43f7537c0ab0fbdff510 (diff) | |
Merge branch 'master' into TVFix
Diffstat (limited to 'Jellyfin.Api/Controllers/LiveTvController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/LiveTvController.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs index b20eae750..b131530c9 100644 --- a/Jellyfin.Api/Controllers/LiveTvController.cs +++ b/Jellyfin.Api/Controllers/LiveTvController.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; -using System.IO; using System.Linq; using System.Net.Http; using System.Net.Mime; @@ -1200,15 +1199,15 @@ namespace Jellyfin.Api.Controllers [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status404NotFound)] [ProducesVideoFile] - public async Task<ActionResult> GetLiveStreamFile([FromRoute, Required] string streamId, [FromRoute, Required] string container) + public ActionResult GetLiveStreamFile([FromRoute, Required] string streamId, [FromRoute, Required] string container) { - var liveStreamInfo = await _mediaSourceManager.GetDirectStreamProviderByUniqueId(streamId, CancellationToken.None).ConfigureAwait(false); + var liveStreamInfo = _mediaSourceManager.GetLiveStreamInfoByUniqueId(streamId); if (liveStreamInfo == null) { return NotFound(); } - var liveStream = new ProgressiveFileStream(liveStreamInfo.GetFilePath(), null, _transcodingJobHelper); + var liveStream = new ProgressiveFileStream(liveStreamInfo.GetStream()); return new FileStreamResult(liveStream, MimeTypes.GetMimeType("file." + container)); } |
