aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/LiveTvController.cs
diff options
context:
space:
mode:
authoroledfish <88390729+oledfish@users.noreply.github.com>2022-01-16 21:33:18 -0300
committerGitHub <noreply@github.com>2022-01-16 21:33:18 -0300
commit3b075a58027be4a2a3bdf662c70934f6cafafe87 (patch)
treeb4c226f25f843c3f2685c92e1edc3b3999716d34 /Jellyfin.Api/Controllers/LiveTvController.cs
parent86a5e72a65df638df2cde349ccd2ad8c5d40f88c (diff)
parentef0708d876434a99ec647473c37295fab45a35fb (diff)
Merge branch 'jellyfin:master' into additional-episode-orders
Diffstat (limited to 'Jellyfin.Api/Controllers/LiveTvController.cs')
-rw-r--r--Jellyfin.Api/Controllers/LiveTvController.cs64
1 files changed, 33 insertions, 31 deletions
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs
index 93dc76729..9e2ef8c60 100644
--- a/Jellyfin.Api/Controllers/LiveTvController.cs
+++ b/Jellyfin.Api/Controllers/LiveTvController.cs
@@ -278,25 +278,26 @@ namespace Jellyfin.Api.Controllers
return _liveTvManager.GetRecordings(
new RecordingQuery
- {
- ChannelId = channelId,
- UserId = userId ?? Guid.Empty,
- StartIndex = startIndex,
- Limit = limit,
- Status = status,
- SeriesTimerId = seriesTimerId,
- IsInProgress = isInProgress,
- EnableTotalRecordCount = enableTotalRecordCount,
- IsMovie = isMovie,
- IsNews = isNews,
- IsSeries = isSeries,
- IsKids = isKids,
- IsSports = isSports,
- IsLibraryItem = isLibraryItem,
- Fields = fields,
- ImageTypeLimit = imageTypeLimit,
- EnableImages = enableImages
- }, dtoOptions);
+ {
+ ChannelId = channelId,
+ UserId = userId ?? Guid.Empty,
+ StartIndex = startIndex,
+ Limit = limit,
+ Status = status,
+ SeriesTimerId = seriesTimerId,
+ IsInProgress = isInProgress,
+ EnableTotalRecordCount = enableTotalRecordCount,
+ IsMovie = isMovie,
+ IsNews = isNews,
+ IsSeries = isSeries,
+ IsKids = isKids,
+ IsSports = isSports,
+ IsLibraryItem = isLibraryItem,
+ Fields = fields,
+ ImageTypeLimit = imageTypeLimit,
+ EnableImages = enableImages
+ },
+ dtoOptions);
}
/// <summary>
@@ -489,14 +490,14 @@ namespace Jellyfin.Api.Controllers
[FromQuery] bool? isScheduled)
{
return await _liveTvManager.GetTimers(
- new TimerQuery
- {
- ChannelId = channelId,
- SeriesTimerId = seriesTimerId,
- IsActive = isActive,
- IsScheduled = isScheduled
- }, CancellationToken.None)
- .ConfigureAwait(false);
+ new TimerQuery
+ {
+ ChannelId = channelId,
+ SeriesTimerId = seriesTimerId,
+ IsActive = isActive,
+ IsScheduled = isScheduled
+ },
+ CancellationToken.None).ConfigureAwait(false);
}
/// <summary>
@@ -867,7 +868,8 @@ namespace Jellyfin.Api.Controllers
{
SortOrder = sortOrder ?? SortOrder.Ascending,
SortBy = sortBy
- }, CancellationToken.None).ConfigureAwait(false);
+ },
+ CancellationToken.None).ConfigureAwait(false);
}
/// <summary>
@@ -1199,15 +1201,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));
}