PlayGroupRequest.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 PlayGroupRequest.
  10. /// </summary>
  11. public class PlayGroupRequest : IGroupPlaybackRequest
  12. {
  13. /// <summary>
  14. /// Gets the playing queue.
  15. /// </summary>
  16. /// <value>The playing queue.</value>
  17. public List<Guid> PlayingQueue { get; } = new List<Guid>();
  18. /// <summary>
  19. /// Gets or sets the playing item from the queue.
  20. /// </summary>
  21. /// <value>The playing item.</value>
  22. public int PlayingItemPosition { get; set; }
  23. /// <summary>
  24. /// Gets or sets the start position ticks.
  25. /// </summary>
  26. /// <value>The start position ticks.</value>
  27. public long StartPositionTicks { get; set; }
  28. /// <inheritdoc />
  29. public PlaybackRequestType Type { get; } = PlaybackRequestType.Play;
  30. /// <inheritdoc />
  31. public void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
  32. {
  33. state.HandleRequest(context, state.Type, this, session, cancellationToken);
  34. }
  35. }
  36. }