diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs index 653b011f73..2560502173 100644 --- a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs +++ b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs @@ -81,34 +81,6 @@ private double lengthInSeconds public double BPM { get; set; } - public virtual BeatmapInfo ToBeatmapInfo(RulesetStore rulesets) - { - var set = BeatmapSet?.ToBeatmapSet(rulesets); - - return new BeatmapInfo - { - Metadata = set?.Metadata ?? new BeatmapMetadata(), - Ruleset = rulesets.GetRuleset(RulesetID), - StarDifficulty = StarRating, - OnlineBeatmapID = OnlineID, - Version = DifficultyName, - // this is actually an incorrect mapping (Length is calculated as drain length in lazer's import process, see BeatmapManager.calculateLength). - Length = Length, - Status = Status, - MD5Hash = Checksum, - BeatmapSet = set, - MaxCombo = MaxCombo, - BaseDifficulty = new BeatmapDifficulty - { - DrainRate = DrainRate, - CircleSize = CircleSize, - ApproachRate = ApproachRate, - OverallDifficulty = OverallDifficulty, - }, - OnlineInfo = this, - }; - } - #region Implementation of IBeatmapInfo public IBeatmapMetadataInfo Metadata => (BeatmapSet as IBeatmapSetInfo)?.Metadata ?? new BeatmapMetadata(); diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs index c41271ad5c..47536879b2 100644 --- a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs +++ b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs @@ -3,11 +3,9 @@ using System; using System.Collections.Generic; -using System.Linq; using Newtonsoft.Json; using osu.Game.Beatmaps; using osu.Game.Database; -using osu.Game.Rulesets; using osu.Game.Users; #nullable enable @@ -121,26 +119,6 @@ public string AuthorString [JsonProperty(@"beatmaps")] public APIBeatmap[] Beatmaps { get; set; } = Array.Empty(); - public virtual BeatmapSetInfo ToBeatmapSet(RulesetStore rulesets) - { - var beatmapSet = new BeatmapSetInfo - { - OnlineBeatmapSetID = OnlineID, - Metadata = metadata, - Status = Status, - }; - - beatmapSet.Beatmaps = Beatmaps.Select(b => - { - var beatmap = b.ToBeatmapInfo(rulesets); - beatmap.BeatmapSet = beatmapSet; - beatmap.Metadata = beatmapSet.Metadata; - return beatmap; - }).ToList(); - - return beatmapSet; - } - private BeatmapMetadata metadata => new BeatmapMetadata { Title = Title,