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