| | | 1 | | #nullable disable |
| | | 2 | | |
| | | 3 | | using System; |
| | | 4 | | using System.Threading; |
| | | 5 | | using MediaBrowser.Controller.Session; |
| | | 6 | | using MediaBrowser.Model.SyncPlay; |
| | | 7 | | |
| | | 8 | | namespace MediaBrowser.Controller.SyncPlay.PlaybackRequests |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Class MovePlaylistItemGroupRequest. |
| | | 12 | | /// </summary> |
| | | 13 | | public class MovePlaylistItemGroupRequest : AbstractPlaybackRequest |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Initializes a new instance of the <see cref="MovePlaylistItemGroupRequest"/> class. |
| | | 17 | | /// </summary> |
| | | 18 | | /// <param name="playlistItemId">The playlist identifier of the item.</param> |
| | | 19 | | /// <param name="newIndex">The new position.</param> |
| | 0 | 20 | | public MovePlaylistItemGroupRequest(Guid playlistItemId, int newIndex) |
| | | 21 | | { |
| | | 22 | | PlaylistItemId = playlistItemId; |
| | | 23 | | NewIndex = newIndex; |
| | 0 | 24 | | } |
| | | 25 | | |
| | | 26 | | /// <summary> |
| | | 27 | | /// Gets the playlist identifier of the item. |
| | | 28 | | /// </summary> |
| | | 29 | | /// <value>The playlist identifier of the item.</value> |
| | | 30 | | public Guid PlaylistItemId { get; } |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// Gets the new position. |
| | | 34 | | /// </summary> |
| | | 35 | | /// <value>The new position.</value> |
| | | 36 | | public int NewIndex { get; } |
| | | 37 | | |
| | | 38 | | /// <inheritdoc /> |
| | | 39 | | public override PlaybackRequestType Action { get; } = PlaybackRequestType.MovePlaylistItem; |
| | | 40 | | |
| | | 41 | | /// <inheritdoc /> |
| | | 42 | | public override void Apply(IGroupStateContext context, IGroupState state, SessionInfo session, CancellationToken |
| | | 43 | | { |
| | 0 | 44 | | state.HandleRequest(this, context, state.Type, session, cancellationToken); |
| | 0 | 45 | | } |
| | | 46 | | } |
| | | 47 | | } |