diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs index aca295419e..580bf849a6 100644 --- a/Jellyfin.Api/Controllers/LiveTvController.cs +++ b/Jellyfin.Api/Controllers/LiveTvController.cs @@ -724,6 +724,27 @@ namespace Jellyfin.Api.Controllers return _liveTvManager.GetRecommendedPrograms(query, dtoOptions, CancellationToken.None); } + /// + /// Gets a live tv program. + /// + /// Program id. + /// Optional. Attach user data. + /// Program returned. + /// An containing the livetv program. + [HttpGet("Programs/{programId{")] + [Authorize(Policy = Policies.DefaultAuthorization)] + [ProducesResponseType(StatusCodes.Status200OK)] + public async Task> GetProgram( + [FromRoute] string programId, + [FromQuery] Guid userId) + { + var user = userId.Equals(Guid.Empty) + ? null + : _userManager.GetUserById(userId); + + return await _liveTvManager.GetProgram(programId, CancellationToken.None, user).ConfigureAwait(false); + } + /// /// Deletes a live tv recording. /// @@ -779,7 +800,7 @@ namespace Jellyfin.Api.Controllers [HttpPost("Timers/{timerId}")] [Authorize(Policy = Policies.DefaultAuthorization)] [ProducesResponseType(StatusCodes.Status204NoContent)] - [SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "channelId", Justification = "Imported from ServiceStack")] + [SuppressMessage("Microsoft.Performance", "CA1801:ReviewUnusedParameters", MessageId = "timerId", Justification = "Imported from ServiceStack")] public async Task UpdateTimer([FromRoute] string timerId, [FromBody] TimerInfoDto timerInfo) { AssertUserCanManageLiveTv();