commit
1073d41c4d
|
@ -153,7 +153,6 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <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>
|
/// <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>
|
||||||
/// <param name="playRequest">The <see cref="PlayRequest"/>.</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")]
|
||||||
|
@ -163,17 +162,14 @@ namespace Jellyfin.Api.Controllers
|
||||||
[FromRoute, Required] string? sessionId,
|
[FromRoute, Required] string? sessionId,
|
||||||
[FromQuery] Guid[] itemIds,
|
[FromQuery] Guid[] itemIds,
|
||||||
[FromQuery] long? startPositionTicks,
|
[FromQuery] long? startPositionTicks,
|
||||||
[FromQuery] PlayCommand playCommand,
|
[FromQuery] PlayCommand playCommand)
|
||||||
[FromBody, Required] PlayRequest playRequest)
|
|
||||||
{
|
{
|
||||||
if (playRequest == null)
|
var playRequest = new PlayRequest
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Request Body may not be null");
|
ItemIds = itemIds,
|
||||||
}
|
StartPositionTicks = startPositionTicks,
|
||||||
|
PlayCommand = playCommand
|
||||||
playRequest.ItemIds = itemIds;
|
};
|
||||||
playRequest.StartPositionTicks = startPositionTicks;
|
|
||||||
playRequest.PlayCommand = playCommand;
|
|
||||||
|
|
||||||
_sessionManager.SendPlayCommand(
|
_sessionManager.SendPlayCommand(
|
||||||
RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id,
|
RequestHelpers.GetSession(_sessionManager, _authContext, Request).Id,
|
||||||
|
|
|
@ -15,21 +15,18 @@ namespace MediaBrowser.Model.Session
|
||||||
/// Gets or sets the item ids.
|
/// Gets or sets the item ids.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The item ids.</value>
|
/// <value>The item ids.</value>
|
||||||
[ApiMember(Name = "ItemIds", Description = "The ids of the items to play, comma delimited", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST", AllowMultiple = true)]
|
|
||||||
public Guid[] ItemIds { get; set; }
|
public Guid[] ItemIds { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the start position ticks that the first item should be played at.
|
/// Gets or sets the start position ticks that the first item should be played at.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The start position ticks.</value>
|
/// <value>The start position ticks.</value>
|
||||||
[ApiMember(Name = "StartPositionTicks", Description = "The starting position of the first item.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
|
|
||||||
public long? StartPositionTicks { get; set; }
|
public long? StartPositionTicks { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the play command.
|
/// Gets or sets the play command.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The play command.</value>
|
/// <value>The play command.</value>
|
||||||
[ApiMember(Name = "PlayCommand", Description = "The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
|
|
||||||
public PlayCommand PlayCommand { get; set; }
|
public PlayCommand PlayCommand { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user