QueueGroupRequest.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using MediaBrowser.Controller.Session;
  5. using MediaBrowser.Model.SyncPlay;
  6. namespace MediaBrowser.Controller.SyncPlay
  7. {
  8. /// <summary>
  9. /// Class QueueGroupRequest.
  10. /// </summary>
  11. public class QueueGroupRequest : IGroupPlaybackRequest
  12. {
  13. /// <summary>
  14. /// Gets the items to queue.
  15. /// </summary>
  16. /// <value>The items to queue.</value>
  17. public List<Guid> ItemIds { get; } = new List<Guid>();
  18. /// <summary>
  19. /// Gets or sets the mode in which to add the new items.
  20. /// </summary>
  21. /// <value>The mode.</value>
  22. public string Mode { get; set; }
  23. /// <inheritdoc />
  24. public PlaybackRequestType Type { get; } = PlaybackRequestType.Queue;
  25. /// <inheritdoc />
  26. public void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
  27. {
  28. state.HandleRequest(context, state.Type, this, session, cancellationToken);
  29. }
  30. }
  31. }