using System; using System.Collections.Generic; using System.Threading; using MediaBrowser.Controller.Session; using MediaBrowser.Model.SyncPlay; namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests { /// /// Class QueueGroupRequest. /// public class QueueGroupRequest : IGroupPlaybackRequest { /// /// Initializes a new instance of the class. /// /// The items to add to the queue. /// The enqueue mode. public QueueGroupRequest(Guid[] items, GroupQueueMode mode) { ItemIds = items ?? Array.Empty(); Mode = mode; } /// /// Gets the items to enqueue. /// /// The items to enqueue. public IReadOnlyList ItemIds { get; } /// /// Gets the mode in which to add the new items. /// /// The enqueue mode. public GroupQueueMode Mode { get; } /// public PlaybackRequestType Type { get; } = PlaybackRequestType.Queue; /// public void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken) { state.HandleRequest(context, state.Type, this, session, cancellationToken); } } }