Add missing endpoint
This commit is contained in:
parent
13c4cb628f
commit
0830d381c4
|
@ -724,6 +724,27 @@ namespace Jellyfin.Api.Controllers
|
||||||
return _liveTvManager.GetRecommendedPrograms(query, dtoOptions, CancellationToken.None);
|
return _liveTvManager.GetRecommendedPrograms(query, dtoOptions, CancellationToken.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a live tv program.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="programId">Program id.</param>
|
||||||
|
/// <param name="userId">Optional. Attach user data.</param>
|
||||||
|
/// <response code="200">Program returned.</response>
|
||||||
|
/// <returns>An <see cref="OkResult"/> containing the livetv program.</returns>
|
||||||
|
[HttpGet("Programs/{programId{")]
|
||||||
|
[Authorize(Policy = Policies.DefaultAuthorization)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
public async Task<ActionResult<BaseItemDto>> 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);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a live tv recording.
|
/// Deletes a live tv recording.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -779,7 +800,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
[HttpPost("Timers/{timerId}")]
|
[HttpPost("Timers/{timerId}")]
|
||||||
[Authorize(Policy = Policies.DefaultAuthorization)]
|
[Authorize(Policy = Policies.DefaultAuthorization)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[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<ActionResult> UpdateTimer([FromRoute] string timerId, [FromBody] TimerInfoDto timerInfo)
|
public async Task<ActionResult> UpdateTimer([FromRoute] string timerId, [FromBody] TimerInfoDto timerInfo)
|
||||||
{
|
{
|
||||||
AssertUserCanManageLiveTv();
|
AssertUserCanManageLiveTv();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user