Rename 'track' into 'item' in SyncPlay
This commit is contained in:
parent
7e0ea296c3
commit
389367fec8
|
@ -108,14 +108,14 @@ namespace Jellyfin.Api.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request play in SyncPlay group.
|
/// Request to set new playlist in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The new playlist to play in the group.</param>
|
/// <param name="requestData">The new playlist to play in the group.</param>
|
||||||
/// <response code="204">Play request sent to all group members.</response>
|
/// <response code="204">Queue update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("Play")]
|
[HttpPost("SetNewQueue")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public ActionResult SyncPlayPlay(
|
public ActionResult SyncPlaySetNewQueue(
|
||||||
[FromBody, Required] PlayRequestBody requestData)
|
[FromBody, Required] PlayRequestBody requestData)
|
||||||
{
|
{
|
||||||
var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
|
var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
|
||||||
|
@ -131,7 +131,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Request to change playlist item in SyncPlay group.
|
/// Request to change playlist item in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The new item to play.</param>
|
/// <param name="requestData">The new item to play.</param>
|
||||||
/// <response code="204">Queue update request sent to all group members.</response>
|
/// <response code="204">Queue update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("SetPlaylistItem")]
|
[HttpPost("SetPlaylistItem")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -148,7 +148,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Request to remove items from the playlist in SyncPlay group.
|
/// Request to remove items from the playlist in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The items to remove.</param>
|
/// <param name="requestData">The items to remove.</param>
|
||||||
/// <response code="204">Queue update request sent to all group members.</response>
|
/// <response code="204">Queue update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("RemoveFromPlaylist")]
|
[HttpPost("RemoveFromPlaylist")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -165,7 +165,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Request to move an item in the playlist in SyncPlay group.
|
/// Request to move an item in the playlist in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The new position for the item.</param>
|
/// <param name="requestData">The new position for the item.</param>
|
||||||
/// <response code="204">Queue update request sent to all group members.</response>
|
/// <response code="204">Queue update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("MovePlaylistItem")]
|
[HttpPost("MovePlaylistItem")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -182,7 +182,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Request to queue items to the playlist of a SyncPlay group.
|
/// Request to queue items to the playlist of a SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The items to add.</param>
|
/// <param name="requestData">The items to add.</param>
|
||||||
/// <response code="204">Queue update request sent to all group members.</response>
|
/// <response code="204">Queue update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("Queue")]
|
[HttpPost("Queue")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -198,7 +198,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request unpause in SyncPlay group.
|
/// Request unpause in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <response code="204">Unpause request sent to all group members.</response>
|
/// <response code="204">Unpause update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("Unpause")]
|
[HttpPost("Unpause")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -213,7 +213,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request pause in SyncPlay group.
|
/// Request pause in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <response code="204">Pause request sent to all group members.</response>
|
/// <response code="204">Pause update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("Pause")]
|
[HttpPost("Pause")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -228,7 +228,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request stop in SyncPlay group.
|
/// Request stop in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <response code="204">Stop request sent to all group members.</response>
|
/// <response code="204">Stop update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("Stop")]
|
[HttpPost("Stop")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -244,7 +244,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
/// Request seek in SyncPlay group.
|
/// Request seek in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The new playback position.</param>
|
/// <param name="requestData">The new playback position.</param>
|
||||||
/// <response code="204">Seek request sent to all group members.</response>
|
/// <response code="204">Seek update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("Seek")]
|
[HttpPost("Seek")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
|
@ -317,35 +317,35 @@ namespace Jellyfin.Api.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request next track in SyncPlay group.
|
/// Request next item in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The current track information.</param>
|
/// <param name="requestData">The current item information.</param>
|
||||||
/// <response code="204">Next track request sent to all group members.</response>
|
/// <response code="204">Next item update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("NextTrack")]
|
[HttpPost("NextItem")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public ActionResult SyncPlayNextTrack(
|
public ActionResult SyncPlayNextItem(
|
||||||
[FromBody, Required] NextTrackRequestBody requestData)
|
[FromBody, Required] NextItemRequestBody requestData)
|
||||||
{
|
{
|
||||||
var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
|
var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
|
||||||
var syncPlayRequest = new NextTrackGroupRequest(requestData.PlaylistItemId);
|
var syncPlayRequest = new NextItemGroupRequest(requestData.PlaylistItemId);
|
||||||
_syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None);
|
_syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Request previous track in SyncPlay group.
|
/// Request previous item in SyncPlay group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="requestData">The current track information.</param>
|
/// <param name="requestData">The current item information.</param>
|
||||||
/// <response code="204">Previous track request sent to all group members.</response>
|
/// <response code="204">Previous item update sent to all group members.</response>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
||||||
[HttpPost("PreviousTrack")]
|
[HttpPost("PreviousItem")]
|
||||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||||
public ActionResult SyncPlayPreviousTrack(
|
public ActionResult SyncPlayPreviousItem(
|
||||||
[FromBody, Required] PreviousTrackRequestBody requestData)
|
[FromBody, Required] PreviousItemRequestBody requestData)
|
||||||
{
|
{
|
||||||
var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
|
var currentSession = RequestHelpers.GetSession(_sessionManager, _authorizationContext, Request);
|
||||||
var syncPlayRequest = new PreviousTrackGroupRequest(requestData.PlaylistItemId);
|
var syncPlayRequest = new PreviousItemGroupRequest(requestData.PlaylistItemId);
|
||||||
_syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None);
|
_syncPlayManager.HandleRequest(currentSession, syncPlayRequest, CancellationToken.None);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,13 +157,13 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
UnhandledRequest(request);
|
UnhandledRequest(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public virtual void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
UnhandledRequest(request);
|
UnhandledRequest(request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Change state.
|
// Change state.
|
||||||
var waitingState = new WaitingGroupState(LoggerFactory);
|
var waitingState = new WaitingGroupState(LoggerFactory);
|
||||||
|
@ -102,7 +102,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Change state.
|
// Change state.
|
||||||
var waitingState = new WaitingGroupState(LoggerFactory);
|
var waitingState = new WaitingGroupState(LoggerFactory);
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Change state.
|
// Change state.
|
||||||
var waitingState = new WaitingGroupState(LoggerFactory);
|
var waitingState = new WaitingGroupState(LoggerFactory);
|
||||||
|
@ -154,7 +154,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Change state.
|
// Change state.
|
||||||
var waitingState = new WaitingGroupState(LoggerFactory);
|
var waitingState = new WaitingGroupState(LoggerFactory);
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Change state.
|
// Change state.
|
||||||
var waitingState = new WaitingGroupState(LoggerFactory);
|
var waitingState = new WaitingGroupState(LoggerFactory);
|
||||||
|
@ -157,7 +157,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Change state.
|
// Change state.
|
||||||
var waitingState = new WaitingGroupState(LoggerFactory);
|
var waitingState = new WaitingGroupState(LoggerFactory);
|
||||||
|
|
|
@ -560,7 +560,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Save state if first event.
|
// Save state if first event.
|
||||||
if (!InitialStateSet)
|
if (!InitialStateSet)
|
||||||
|
@ -582,7 +582,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
if (newItem)
|
if (newItem)
|
||||||
{
|
{
|
||||||
// Send playing-queue update.
|
// Send playing-queue update.
|
||||||
var playQueueUpdate = context.GetPlayQueueUpdate(PlayQueueUpdateReason.NextTrack);
|
var playQueueUpdate = context.GetPlayQueueUpdate(PlayQueueUpdateReason.NextItem);
|
||||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||||
|
|
||||||
|
@ -601,12 +601,12 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
|
|
||||||
context.SetState(newState);
|
context.SetState(newState);
|
||||||
|
|
||||||
_logger.LogDebug("No next track available in group {GroupId}.", context.GroupId.ToString());
|
_logger.LogDebug("No next item available in group {GroupId}.", context.GroupId.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
public override void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
// Save state if first event.
|
// Save state if first event.
|
||||||
if (!InitialStateSet)
|
if (!InitialStateSet)
|
||||||
|
@ -628,7 +628,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
if (newItem)
|
if (newItem)
|
||||||
{
|
{
|
||||||
// Send playing-queue update.
|
// Send playing-queue update.
|
||||||
var playQueueUpdate = context.GetPlayQueueUpdate(PlayQueueUpdateReason.PreviousTrack);
|
var playQueueUpdate = context.GetPlayQueueUpdate(PlayQueueUpdateReason.PreviousItem);
|
||||||
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
var update = context.NewSyncPlayGroupUpdate(GroupUpdateType.PlayQueue, playQueueUpdate);
|
||||||
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
context.SendGroupUpdate(session, SyncPlayBroadcastType.AllGroup, update, cancellationToken);
|
||||||
|
|
||||||
|
@ -647,7 +647,7 @@ namespace MediaBrowser.Controller.SyncPlay.GroupStates
|
||||||
|
|
||||||
context.SetState(newState);
|
context.SetState(newState);
|
||||||
|
|
||||||
_logger.LogDebug("No previous track available in group {GroupId}.", context.GroupId.ToString());
|
_logger.LogDebug("No previous item available in group {GroupId}.", context.GroupId.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,24 +155,24 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||||
void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
|
void HandleRequest(IGroupStateContext context, GroupStateType prevState, ReadyGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles a next-track request from a session. Context's state can change.
|
/// Handles a next-item request from a session. Context's state can change.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="context">The context of the state.</param>
|
/// <param name="context">The context of the state.</param>
|
||||||
/// <param name="prevState">The previous state.</param>
|
/// <param name="prevState">The previous state.</param>
|
||||||
/// <param name="request">The next-track request.</param>
|
/// <param name="request">The next-item request.</param>
|
||||||
/// <param name="session">The session.</param>
|
/// <param name="session">The session.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
|
void HandleRequest(IGroupStateContext context, GroupStateType prevState, NextItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles a previous-track request from a session. Context's state can change.
|
/// Handles a previous-item request from a session. Context's state can change.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="context">The context of the state.</param>
|
/// <param name="context">The context of the state.</param>
|
||||||
/// <param name="prevState">The previous state.</param>
|
/// <param name="prevState">The previous state.</param>
|
||||||
/// <param name="request">The previous-track request.</param>
|
/// <param name="request">The previous-item request.</param>
|
||||||
/// <param name="session">The session.</param>
|
/// <param name="session">The session.</param>
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
/// <param name="cancellationToken">The cancellation token.</param>
|
||||||
void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousTrackGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
|
void HandleRequest(IGroupStateContext context, GroupStateType prevState, PreviousItemGroupRequest request, SessionInfo session, CancellationToken cancellationToken);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles a set-repeat-mode request from a session. Context's state should not change.
|
/// Handles a set-repeat-mode request from a session. Context's state should not change.
|
||||||
|
|
|
@ -5,15 +5,15 @@ using MediaBrowser.Model.SyncPlay;
|
||||||
namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class NextTrackGroupRequest.
|
/// Class NextItemGroupRequest.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NextTrackGroupRequest : AbstractPlaybackRequest
|
public class NextItemGroupRequest : AbstractPlaybackRequest
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="NextTrackGroupRequest"/> class.
|
/// Initializes a new instance of the <see cref="NextItemGroupRequest"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistItemId">The playing item identifier.</param>
|
/// <param name="playlistItemId">The playing item identifier.</param>
|
||||||
public NextTrackGroupRequest(string playlistItemId)
|
public NextItemGroupRequest(string playlistItemId)
|
||||||
{
|
{
|
||||||
PlaylistItemId = playlistItemId;
|
PlaylistItemId = playlistItemId;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||||
public string PlaylistItemId { get; }
|
public string PlaylistItemId { get; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override PlaybackRequestType Action { get; } = PlaybackRequestType.NextTrack;
|
public override PlaybackRequestType Action { get; } = PlaybackRequestType.NextItem;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
|
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
|
|
@ -5,15 +5,15 @@ using MediaBrowser.Model.SyncPlay;
|
||||||
namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class PreviousTrackGroupRequest.
|
/// Class PreviousItemGroupRequest.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PreviousTrackGroupRequest : AbstractPlaybackRequest
|
public class PreviousItemGroupRequest : AbstractPlaybackRequest
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PreviousTrackGroupRequest"/> class.
|
/// Initializes a new instance of the <see cref="PreviousItemGroupRequest"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistItemId">The playing item identifier.</param>
|
/// <param name="playlistItemId">The playing item identifier.</param>
|
||||||
public PreviousTrackGroupRequest(string playlistItemId)
|
public PreviousItemGroupRequest(string playlistItemId)
|
||||||
{
|
{
|
||||||
PlaylistItemId = playlistItemId;
|
PlaylistItemId = playlistItemId;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests
|
||||||
public string PlaylistItemId { get; }
|
public string PlaylistItemId { get; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override PlaybackRequestType Action { get; } = PlaybackRequestType.PreviousTrack;
|
public override PlaybackRequestType Action { get; } = PlaybackRequestType.PreviousItem;
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
|
public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
|
|
@ -38,12 +38,12 @@ namespace MediaBrowser.Model.SyncPlay
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A user is requesting the next item in queue.
|
/// A user is requesting the next item in queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
NextTrack = 6,
|
NextItem = 6,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A user is requesting the previous item in queue.
|
/// A user is requesting the previous item in queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
PreviousTrack = 7,
|
PreviousItem = 7,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A user is changing repeat mode.
|
/// A user is changing repeat mode.
|
||||||
|
|
|
@ -61,14 +61,14 @@ namespace MediaBrowser.Model.SyncPlay
|
||||||
Ready = 10,
|
Ready = 10,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A user is requesting next track in playlist.
|
/// A user is requesting next item in playlist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
NextTrack = 11,
|
NextItem = 11,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A user is requesting previous track in playlist.
|
/// A user is requesting previous item in playlist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
PreviousTrack = 12,
|
PreviousItem = 12,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A user is setting the repeat mode.
|
/// A user is setting the repeat mode.
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
namespace MediaBrowser.Model.SyncPlay.RequestBodies
|
namespace MediaBrowser.Model.SyncPlay.RequestBodies
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class NextTrackRequestBody.
|
/// Class NextItemRequestBody.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NextTrackRequestBody
|
public class NextItemRequestBody
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="NextTrackRequestBody"/> class.
|
/// Initializes a new instance of the <see cref="NextItemRequestBody"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public NextTrackRequestBody()
|
public NextItemRequestBody()
|
||||||
{
|
{
|
||||||
PlaylistItemId = string.Empty;
|
PlaylistItemId = string.Empty;
|
||||||
}
|
}
|
|
@ -1,14 +1,14 @@
|
||||||
namespace MediaBrowser.Model.SyncPlay.RequestBodies
|
namespace MediaBrowser.Model.SyncPlay.RequestBodies
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class PreviousTrackRequestBody.
|
/// Class PreviousItemRequestBody.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PreviousTrackRequestBody
|
public class PreviousItemRequestBody
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PreviousTrackRequestBody"/> class.
|
/// Initializes a new instance of the <see cref="PreviousItemRequestBody"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PreviousTrackRequestBody()
|
public PreviousItemRequestBody()
|
||||||
{
|
{
|
||||||
PlaylistItemId = string.Empty;
|
PlaylistItemId = string.Empty;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user