PlayQueueUpdate.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. namespace MediaBrowser.Model.SyncPlay
  4. {
  5. /// <summary>
  6. /// Class PlayQueueUpdate.
  7. /// </summary>
  8. public class PlayQueueUpdate
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="PlayQueueUpdate"/> class.
  12. /// </summary>
  13. /// <param name="reason">The reason for the update.</param>
  14. /// <param name="lastUpdate">The UTC time of the last change to the playing queue.</param>
  15. /// <param name="playlist">The playlist.</param>
  16. /// <param name="playingItemIndex">The playing item index in the playlist.</param>
  17. /// <param name="startPositionTicks">The start position ticks.</param>
  18. /// <param name="shuffleMode">The shuffle mode.</param>
  19. /// <param name="repeatMode">The repeat mode.</param>
  20. public PlayQueueUpdate(PlayQueueUpdateReason reason, DateTime lastUpdate, IReadOnlyList<QueueItem> playlist, int playingItemIndex, long startPositionTicks, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode)
  21. {
  22. Reason = reason;
  23. LastUpdate = lastUpdate;
  24. Playlist = playlist;
  25. PlayingItemIndex = playingItemIndex;
  26. StartPositionTicks = startPositionTicks;
  27. ShuffleMode = shuffleMode;
  28. RepeatMode = repeatMode;
  29. }
  30. /// <summary>
  31. /// Gets the request type that originated this update.
  32. /// </summary>
  33. /// <value>The reason for the update.</value>
  34. public PlayQueueUpdateReason Reason { get; }
  35. /// <summary>
  36. /// Gets the UTC time of the last change to the playing queue.
  37. /// </summary>
  38. /// <value>The UTC time of the last change to the playing queue.</value>
  39. public DateTime LastUpdate { get; }
  40. /// <summary>
  41. /// Gets the playlist.
  42. /// </summary>
  43. /// <value>The playlist.</value>
  44. public IReadOnlyList<QueueItem> Playlist { get; }
  45. /// <summary>
  46. /// Gets the playing item index in the playlist.
  47. /// </summary>
  48. /// <value>The playing item index in the playlist.</value>
  49. public int PlayingItemIndex { get; }
  50. /// <summary>
  51. /// Gets the start position ticks.
  52. /// </summary>
  53. /// <value>The start position ticks.</value>
  54. public long StartPositionTicks { get; }
  55. /// <summary>
  56. /// Gets the shuffle mode.
  57. /// </summary>
  58. /// <value>The shuffle mode.</value>
  59. public GroupShuffleMode ShuffleMode { get; }
  60. /// <summary>
  61. /// Gets the repeat mode.
  62. /// </summary>
  63. /// <value>The repeat mode.</value>
  64. public GroupRepeatMode RepeatMode { get; }
  65. }
  66. }