diff options
| author | Ionut Andrei Oanca <oancaionutandrei@gmail.com> | 2020-11-15 17:03:27 +0100 |
|---|---|---|
| committer | Ionut Andrei Oanca <oancaionutandrei@gmail.com> | 2020-11-15 17:30:28 +0100 |
| commit | c7e53bce2fa43ad38807a0589e1bc020237e49c6 (patch) | |
| tree | af484c31dc4b762aba404a28462a3cae8c23f5b5 /MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs | |
| parent | 5d77f422f0e4998130f1defebd08e053188a1a25 (diff) | |
Patch data-races and minor changes in SyncPlay
Diffstat (limited to 'MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs')
| -rw-r--r-- | MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs b/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs index d193b4c66..a851229f7 100644 --- a/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs +++ b/MediaBrowser.Model/SyncPlay/PlayQueueUpdate.cs @@ -11,51 +11,64 @@ namespace MediaBrowser.Model.SyncPlay /// <summary> /// Initializes a new instance of the <see cref="PlayQueueUpdate"/> class. /// </summary> - public PlayQueueUpdate() + /// <param name="reason">The reason for the update.</param> + /// <param name="lastUpdate">The UTC time of the last change to the playing queue.</param> + /// <param name="playlist">The playlist.</param> + /// <param name="playingItemIndex">The playing item index in the playlist.</param> + /// <param name="startPositionTicks">The start position ticks.</param> + /// <param name="shuffleMode">The shuffle mode.</param> + /// <param name="repeatMode">The repeat mode.</param> + public PlayQueueUpdate(PlayQueueUpdateReason reason, DateTime lastUpdate, IReadOnlyList<QueueItem> playlist, int playingItemIndex, long startPositionTicks, GroupShuffleMode shuffleMode, GroupRepeatMode repeatMode) { - Playlist = new List<QueueItem>(); + Reason = reason; + LastUpdate = lastUpdate; + Playlist = playlist; + PlayingItemIndex = playingItemIndex; + StartPositionTicks = startPositionTicks; + ShuffleMode = shuffleMode; + RepeatMode = repeatMode; } /// <summary> - /// Gets or sets the request type that originated this update. + /// Gets the request type that originated this update. /// </summary> /// <value>The reason for the update.</value> - public PlayQueueUpdateReason Reason { get; set; } + public PlayQueueUpdateReason Reason { get; } /// <summary> - /// Gets or sets the UTC time of the last change to the playing queue. + /// Gets the UTC time of the last change to the playing queue. /// </summary> /// <value>The UTC time of the last change to the playing queue.</value> - public DateTime LastUpdate { get; set; } + public DateTime LastUpdate { get; } /// <summary> - /// Gets or sets the playlist. + /// Gets the playlist. /// </summary> /// <value>The playlist.</value> - public IReadOnlyList<QueueItem> Playlist { get; set; } + public IReadOnlyList<QueueItem> Playlist { get; } /// <summary> - /// Gets or sets the playing item index in the playlist. + /// Gets the playing item index in the playlist. /// </summary> /// <value>The playing item index in the playlist.</value> - public int PlayingItemIndex { get; set; } + public int PlayingItemIndex { get; } /// <summary> - /// Gets or sets the start position ticks. + /// Gets the start position ticks. /// </summary> /// <value>The start position ticks.</value> - public long StartPositionTicks { get; set; } + public long StartPositionTicks { get; } /// <summary> - /// Gets or sets the shuffle mode. + /// Gets the shuffle mode. /// </summary> /// <value>The shuffle mode.</value> - public GroupShuffleMode ShuffleMode { get; set; } + public GroupShuffleMode ShuffleMode { get; } /// <summary> - /// Gets or sets the repeat mode. + /// Gets the repeat mode. /// </summary> /// <value>The repeat mode.</value> - public GroupRepeatMode RepeatMode { get; set; } + public GroupRepeatMode RepeatMode { get; } } } |
