MovePlaylistItemGroupRequest.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using System.Threading;
  2. using MediaBrowser.Controller.Session;
  3. using MediaBrowser.Model.SyncPlay;
  4. namespace MediaBrowser.Controller.SyncPlay
  5. {
  6. /// <summary>
  7. /// Class MovePlaylistItemGroupRequest.
  8. /// </summary>
  9. public class MovePlaylistItemGroupRequest : IGroupPlaybackRequest
  10. {
  11. /// <summary>
  12. /// Gets or sets the playlist identifier of the item.
  13. /// </summary>
  14. /// <value>The playlist identifier of the item.</value>
  15. public string PlaylistItemId { get; set; }
  16. /// <summary>
  17. /// Gets or sets the new position.
  18. /// </summary>
  19. /// <value>The new position.</value>
  20. public int NewIndex { get; set; }
  21. /// <inheritdoc />
  22. public PlaybackRequestType Type { get; } = PlaybackRequestType.MovePlaylistItem;
  23. /// <inheritdoc />
  24. public void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken cancellationToken)
  25. {
  26. state.HandleRequest(context, state.Type, this, session, cancellationToken);
  27. }
  28. }
  29. }