mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Give playlist items a PlayedAt date
This commit is contained in:
@ -742,7 +742,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
Beatmap = { Value = apiBeatmap },
|
||||
Ruleset = { Value = ruleset },
|
||||
Expired = item.Expired,
|
||||
PlaylistOrder = item.PlaylistOrder
|
||||
PlaylistOrder = item.PlaylistOrder,
|
||||
PlayedAt = item.PlayedAt
|
||||
};
|
||||
|
||||
playlistItem.RequiredMods.AddRange(item.RequiredMods.Select(m => m.ToMod(rulesetInstance)));
|
||||
|
@ -46,11 +46,10 @@ namespace osu.Game.Online.Rooms
|
||||
public ushort PlaylistOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date when this <see cref="MultiplayerPlaylistItem"/> was last updated.
|
||||
/// Not serialised to/from the client.
|
||||
/// The date when this <see cref="MultiplayerPlaylistItem"/> was played.
|
||||
/// </summary>
|
||||
[IgnoreMember]
|
||||
public DateTimeOffset UpdatedAt { get; set; }
|
||||
[Key(9)]
|
||||
public DateTimeOffset? PlayedAt { get; set; }
|
||||
|
||||
public MultiplayerPlaylistItem()
|
||||
{
|
||||
@ -66,6 +65,7 @@ namespace osu.Game.Online.Rooms
|
||||
AllowedMods = item.AllowedMods.Select(m => new APIMod(m)).ToArray();
|
||||
Expired = item.Expired;
|
||||
PlaylistOrder = item.PlaylistOrder ?? 0;
|
||||
PlayedAt = item.PlayedAt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,9 @@ namespace osu.Game.Online.Rooms
|
||||
[JsonProperty("playlist_order")]
|
||||
public ushort? PlaylistOrder { get; set; }
|
||||
|
||||
[JsonProperty("played_at")]
|
||||
public DateTimeOffset? PlayedAt { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public IBindable<bool> Valid => valid;
|
||||
|
||||
|
Reference in New Issue
Block a user