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