mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 11:57:55 +02:00
fix play command route
This commit is contained in:
parent
af2186ab83
commit
14de45602b
1 changed files with 5 additions and 5 deletions
|
@ -150,25 +150,25 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Instructs a session to play an item.
|
/// Instructs a session to play an item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sessionId">The session id.</param>
|
/// <param name="sessionId">The session id.</param>
|
||||||
|
/// <param name="command">The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.</param>
|
||||||
/// <param name="itemIds">The ids of the items to play, comma delimited.</param>
|
/// <param name="itemIds">The ids of the items to play, comma delimited.</param>
|
||||||
/// <param name="startPositionTicks">The starting position of the first item.</param>
|
/// <param name="startPositionTicks">The starting position of the first item.</param>
|
||||||
/// <param name="playCommand">The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.</param>
|
|
||||||
/// <response code="204">Instruction sent to session.</response>
|
/// <response code="204">Instruction sent to session.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/>.</returns>
|
/// <returns>A <see cref="NoContentResult"/>.</returns>
|
||||||
[HttpPost("Sessions/{sessionId}/Playing")]
|
[HttpPost("Sessions/{sessionId}/Playing/{command}")]
|
||||||
[Authorize(Policy = Policies.DefaultAuthorization)]
|
[Authorize(Policy = Policies.DefaultAuthorization)]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public ActionResult Play(
|
public ActionResult Play(
|
||||||
[FromRoute, Required] string sessionId,
|
[FromRoute, Required] string sessionId,
|
||||||
|
[FromRoute, Required] PlayCommand command,
|
||||||
[FromQuery] Guid[] itemIds,
|
[FromQuery] Guid[] itemIds,
|
||||||
[FromQuery] long? startPositionTicks,
|
[FromQuery] long? startPositionTicks)
|
||||||
[FromQuery] PlayCommand playCommand)
|
|
||||||
{
|
{
|
||||||
var playRequest = new PlayRequest
|
var playRequest = new PlayRequest
|
||||||
{
|
{
|
||||||
ItemIds = itemIds,
|
ItemIds = itemIds,
|
||||||
StartPositionTicks = startPositionTicks,
|
StartPositionTicks = startPositionTicks,
|
||||||
PlayCommand = playCommand
|
PlayCommand = command
|
||||||
};
|
};
|
||||||
|
|
||||||
_sessionManager.SendPlayCommand(
|
_sessionManager.SendPlayCommand(
|
||||||
|
|
Loading…
Reference in a new issue