From 9a0dfc00f1e36092476f62984ba66886032f4f89 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sat, 10 Jun 2023 07:28:21 -0600 Subject: Add all websocket messages to generated openapi spec (#9682) * Add all websocket messages to generated openapi spec * Use oneOf * JsonIgnore ServerId * Oops * Add discriminators * Add WebSocketMessage container for Inbound and Outbound messages --- .../SyncPlay/Queue/PlayQueueManager.cs | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'MediaBrowser.Controller/SyncPlay') diff --git a/MediaBrowser.Controller/SyncPlay/Queue/PlayQueueManager.cs b/MediaBrowser.Controller/SyncPlay/Queue/PlayQueueManager.cs index bdebbbfd49..c0a168192e 100644 --- a/MediaBrowser.Controller/SyncPlay/Queue/PlayQueueManager.cs +++ b/MediaBrowser.Controller/SyncPlay/Queue/PlayQueueManager.cs @@ -23,13 +23,13 @@ namespace MediaBrowser.Controller.SyncPlay.Queue /// The sorted playlist. /// /// The sorted playlist, or play queue of the group. - private List _sortedPlaylist = new List(); + private List _sortedPlaylist = new List(); /// /// The shuffled playlist. /// /// The shuffled playlist, or play queue of the group. - private List _shuffledPlaylist = new List(); + private List _shuffledPlaylist = new List(); /// /// Initializes a new instance of the class. @@ -76,7 +76,7 @@ namespace MediaBrowser.Controller.SyncPlay.Queue /// Gets the current playlist considering the shuffle mode. /// /// The playlist. - public IReadOnlyList GetPlaylist() + public IReadOnlyList GetPlaylist() { return GetPlaylistInternal(); } @@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.SyncPlay.Queue _sortedPlaylist = CreateQueueItemsFromArray(items); if (ShuffleMode.Equals(GroupShuffleMode.Shuffle)) { - _shuffledPlaylist = new List(_sortedPlaylist); + _shuffledPlaylist = new List(_sortedPlaylist); _shuffledPlaylist.Shuffle(); } @@ -125,14 +125,14 @@ namespace MediaBrowser.Controller.SyncPlay.Queue { if (PlayingItemIndex == NoPlayingItemIndex) { - _shuffledPlaylist = new List(_sortedPlaylist); + _shuffledPlaylist = new List(_sortedPlaylist); _shuffledPlaylist.Shuffle(); } else if (ShuffleMode.Equals(GroupShuffleMode.Sorted)) { // First time shuffle. var playingItem = _sortedPlaylist[PlayingItemIndex]; - _shuffledPlaylist = new List(_sortedPlaylist); + _shuffledPlaylist = new List(_sortedPlaylist); _shuffledPlaylist.RemoveAt(PlayingItemIndex); _shuffledPlaylist.Shuffle(); _shuffledPlaylist.Insert(0, playingItem); @@ -407,7 +407,7 @@ namespace MediaBrowser.Controller.SyncPlay.Queue /// Gets the next item in the playlist considering repeat mode and shuffle mode. /// /// The next item in the playlist. - public QueueItem GetNextItemPlaylistId() + public SyncPlayQueueItem GetNextItemPlaylistId() { int newIndex; var playlist = GetPlaylistInternal(); @@ -502,12 +502,12 @@ namespace MediaBrowser.Controller.SyncPlay.Queue /// Creates a list from the array of items. Each item is given an unique playlist identifier. /// /// The list of queue items. - private List CreateQueueItemsFromArray(IReadOnlyList items) + private List CreateQueueItemsFromArray(IReadOnlyList items) { - var list = new List(); + var list = new List(); foreach (var item in items) { - var queueItem = new QueueItem(item); + var queueItem = new SyncPlayQueueItem(item); list.Add(queueItem); } @@ -518,7 +518,7 @@ namespace MediaBrowser.Controller.SyncPlay.Queue /// Gets the current playlist considering the shuffle mode. /// /// The playlist. - private List GetPlaylistInternal() + private List GetPlaylistInternal() { if (ShuffleMode.Equals(GroupShuffleMode.Shuffle)) { @@ -532,7 +532,7 @@ namespace MediaBrowser.Controller.SyncPlay.Queue /// Gets the current playing item, depending on the shuffle mode. /// /// The playing item. - private QueueItem GetPlayingItem() + private SyncPlayQueueItem GetPlayingItem() { if (PlayingItemIndex == NoPlayingItemIndex) { -- cgit v1.2.3