using System.Threading; using MediaBrowser.Controller.Session; using MediaBrowser.Model.SyncPlay; namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests { /// /// Class MovePlaylistItemGroupRequest. /// public class MovePlaylistItemGroupRequest : IGroupPlaybackRequest { /// /// Initializes a new instance of the class. /// /// The playlist identifier of the item. /// The new position. public MovePlaylistItemGroupRequest(string playlistItemId, int newIndex) { PlaylistItemId = playlistItemId; NewIndex = newIndex; } /// /// Gets the playlist identifier of the item. /// /// The playlist identifier of the item. public string PlaylistItemId { get; } /// /// Gets the new position. /// /// The new position. public int NewIndex { get; } /// public PlaybackRequestType Type { get; } = PlaybackRequestType.MovePlaylistItem; /// public void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken) { state.HandleRequest(context, state.Type, this, session, cancellationToken); } } }