diff --git a/osu.Game/Online/Multiplayer/IMultiplayerClient.cs b/osu.Game/Online/Multiplayer/IMultiplayerClient.cs
index 4cadc5d606..3e6821b1cd 100644
--- a/osu.Game/Online/Multiplayer/IMultiplayerClient.cs
+++ b/osu.Game/Online/Multiplayer/IMultiplayerClient.cs
@@ -111,7 +111,7 @@ namespace osu.Game.Online.Multiplayer
/// Signals that an item has been added to the playlist.
///
/// The added item.
- Task PlaylistItemAdded(APIPlaylistItem item);
+ Task PlaylistItemAdded(MultiplayerPlaylistItem item);
///
/// Signals that an item has been removed from the playlist.
@@ -123,6 +123,6 @@ namespace osu.Game.Online.Multiplayer
/// Signals that an item has been changed in the playlist.
///
/// The changed item.
- Task PlaylistItemChanged(APIPlaylistItem item);
+ Task PlaylistItemChanged(MultiplayerPlaylistItem item);
}
}
diff --git a/osu.Game/Online/Multiplayer/IMultiplayerRoomServer.cs b/osu.Game/Online/Multiplayer/IMultiplayerRoomServer.cs
index d00022d6f5..cb80c93ef9 100644
--- a/osu.Game/Online/Multiplayer/IMultiplayerRoomServer.cs
+++ b/osu.Game/Online/Multiplayer/IMultiplayerRoomServer.cs
@@ -86,7 +86,7 @@ namespace osu.Game.Online.Multiplayer
/// Adds an item to the playlist.
///
/// The item to add.
- Task AddPlaylistItem(APIPlaylistItem item);
+ Task AddPlaylistItem(MultiplayerPlaylistItem item);
///
/// Removes an item from the playlist.
diff --git a/osu.Game/Online/Multiplayer/MultiplayerClient.cs b/osu.Game/Online/Multiplayer/MultiplayerClient.cs
index 638eb30ee9..ebbd76f237 100644
--- a/osu.Game/Online/Multiplayer/MultiplayerClient.cs
+++ b/osu.Game/Online/Multiplayer/MultiplayerClient.cs
@@ -309,7 +309,7 @@ namespace osu.Game.Online.Multiplayer
public abstract Task RequestAllPlaylistItems();
- public abstract Task AddPlaylistItem(APIPlaylistItem item);
+ public abstract Task AddPlaylistItem(MultiplayerPlaylistItem item);
public abstract Task RemovePlaylistItem(long playlistItemId);
@@ -603,7 +603,7 @@ namespace osu.Game.Online.Multiplayer
return Task.CompletedTask;
}
- public async Task PlaylistItemAdded(APIPlaylistItem item)
+ public async Task PlaylistItemAdded(MultiplayerPlaylistItem item)
{
if (Room == null)
return;
@@ -642,7 +642,7 @@ namespace osu.Game.Online.Multiplayer
return Task.CompletedTask;
}
- public async Task PlaylistItemChanged(APIPlaylistItem item)
+ public async Task PlaylistItemChanged(MultiplayerPlaylistItem item)
{
if (Room == null)
return;
@@ -703,7 +703,7 @@ namespace osu.Game.Online.Multiplayer
CurrentMatchPlayingItem.Value = APIRoom.Playlist.SingleOrDefault(p => p.ID == settings.PlaylistItemId);
}, cancellationToken);
- private async Task createPlaylistItem(APIPlaylistItem item)
+ private async Task createPlaylistItem(MultiplayerPlaylistItem item)
{
var set = await GetOnlineBeatmapSet(item.BeatmapID).ConfigureAwait(false);
diff --git a/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs b/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs
index c7a751500e..5c60dae747 100644
--- a/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs
+++ b/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs
@@ -63,9 +63,9 @@ namespace osu.Game.Online.Multiplayer
connection.On(nameof(IMultiplayerClient.MatchRoomStateChanged), ((IMultiplayerClient)this).MatchRoomStateChanged);
connection.On(nameof(IMultiplayerClient.MatchUserStateChanged), ((IMultiplayerClient)this).MatchUserStateChanged);
connection.On(nameof(IMultiplayerClient.MatchEvent), ((IMultiplayerClient)this).MatchEvent);
- connection.On(nameof(IMultiplayerClient.PlaylistItemAdded), ((IMultiplayerClient)this).PlaylistItemAdded);
+ connection.On(nameof(IMultiplayerClient.PlaylistItemAdded), ((IMultiplayerClient)this).PlaylistItemAdded);
connection.On(nameof(IMultiplayerClient.PlaylistItemRemoved), ((IMultiplayerClient)this).PlaylistItemRemoved);
- connection.On(nameof(IMultiplayerClient.PlaylistItemChanged), ((IMultiplayerClient)this).PlaylistItemChanged);
+ connection.On(nameof(IMultiplayerClient.PlaylistItemChanged), ((IMultiplayerClient)this).PlaylistItemChanged);
};
IsConnected.BindTo(connector.IsConnected);
@@ -155,12 +155,12 @@ namespace osu.Game.Online.Multiplayer
public override Task RequestAllPlaylistItems()
{
if (!IsConnected.Value)
- return Task.FromResult(Array.Empty());
+ return Task.FromResult(Array.Empty());
- return connection.InvokeAsync(nameof(IMultiplayerServer.RequestAllPlaylistItems));
+ return connection.InvokeAsync(nameof(IMultiplayerServer.RequestAllPlaylistItems));
}
- public override Task AddPlaylistItem(APIPlaylistItem item)
+ public override Task AddPlaylistItem(MultiplayerPlaylistItem item)
{
if (!IsConnected.Value)
return Task.CompletedTask;
diff --git a/osu.Game/Online/Rooms/APIPlaylistItem.cs b/osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs
similarity index 90%
rename from osu.Game/Online/Rooms/APIPlaylistItem.cs
rename to osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs
index eddce69976..a158be71a1 100644
--- a/osu.Game/Online/Rooms/APIPlaylistItem.cs
+++ b/osu.Game/Online/Rooms/MultiplayerPlaylistItem.cs
@@ -13,7 +13,7 @@ namespace osu.Game.Online.Rooms
{
[Serializable]
[MessagePackObject]
- public class APIPlaylistItem
+ public class MultiplayerPlaylistItem
{
[Key(0)]
public long ID { get; set; }
@@ -39,11 +39,11 @@ namespace osu.Game.Online.Rooms
[Key(7)]
public bool Expired { get; set; }
- public APIPlaylistItem()
+ public MultiplayerPlaylistItem()
{
}
- public APIPlaylistItem(PlaylistItem item)
+ public MultiplayerPlaylistItem(PlaylistItem item)
{
ID = item.ID;
BeatmapID = item.BeatmapID;
diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs
index 40b086873d..e7998fc01c 100644
--- a/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs
+++ b/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSongSelect.cs
@@ -56,7 +56,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{
loadingLayer.Show();
- client.AddPlaylistItem(new APIPlaylistItem
+ client.AddPlaylistItem(new MultiplayerPlaylistItem
{
BeatmapID = item.BeatmapID,
BeatmapChecksum = item.Beatmap.Value.MD5Hash,
diff --git a/osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs b/osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs
index dc871de3f5..a88bf56cee 100644
--- a/osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs
+++ b/osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs
@@ -41,9 +41,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
[Resolved]
private BeatmapManager beatmaps { get; set; } = null!;
- private readonly List playlistItems = new List();
+ private readonly List playlistItems = new List();
private readonly TestMultiplayerRoomManager roomManager;
- private APIPlaylistItem? currentItem;
+ private MultiplayerPlaylistItem? currentItem;
public TestMultiplayerClient(TestMultiplayerRoomManager roomManager)
{
@@ -162,7 +162,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
if (password != apiRoom.Password.Value)
throw new InvalidOperationException("Invalid password.");
- playlistItems.AddRange(apiRoom.Playlist.Select(i => new APIPlaylistItem(i)));
+ playlistItems.AddRange(apiRoom.Playlist.Select(i => new MultiplayerPlaylistItem(i)));
var localUser = new MultiplayerRoomUser(api.LocalUser.Value.Id)
{
@@ -300,7 +300,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
await ((IMultiplayerClient)this).PlaylistItemAdded(item).ConfigureAwait(false);
}
- public override async Task AddPlaylistItem(APIPlaylistItem item)
+ public override async Task AddPlaylistItem(MultiplayerPlaylistItem item)
{
Debug.Assert(Room != null);
Debug.Assert(APIRoom != null);
@@ -425,7 +425,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Debug.Assert(APIRoom != null);
Debug.Assert(currentItem != null);
- var newItem = new APIPlaylistItem
+ var newItem = new MultiplayerPlaylistItem
{
ID = playlistItems.Last().ID + 1,
BeatmapID = currentItem.BeatmapID,