diff --git a/osu.Game/Beatmaps/BeatmapInfo.cs b/osu.Game/Beatmaps/BeatmapInfo.cs index d2b322a843..782944c28e 100644 --- a/osu.Game/Beatmaps/BeatmapInfo.cs +++ b/osu.Game/Beatmaps/BeatmapInfo.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; using Newtonsoft.Json; using osu.Framework.Testing; using osu.Game.Database; @@ -104,28 +103,6 @@ namespace osu.Game.Beatmaps /// public int CountdownOffset { get; set; } - // Editor - // This bookmarks stuff is necessary because DB doesn't know how to store int[] - [JsonIgnore] - public string StoredBookmarks - { - get => string.Join(',', Bookmarks); - set - { - if (string.IsNullOrEmpty(value)) - { - Bookmarks = Array.Empty(); - return; - } - - Bookmarks = value.Split(',').Select(v => - { - bool result = int.TryParse(v, out int val); - return new { result, val }; - }).Where(p => p.result).Select(p => p.val).ToArray(); - } - } - [NotMapped] public int[] Bookmarks { get; set; } = Array.Empty(); diff --git a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs b/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs index 65d050e608..e5db9d045a 100644 --- a/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyBeatmapDecoder.cs @@ -201,7 +201,11 @@ namespace osu.Game.Beatmaps.Formats switch (pair.Key) { case @"Bookmarks": - beatmap.BeatmapInfo.StoredBookmarks = pair.Value; + beatmap.BeatmapInfo.Bookmarks = pair.Value.Split(',').Select(v => + { + bool result = int.TryParse(v, out int val); + return new { result, val }; + }).Where(p => p.result).Select(p => p.val).ToArray(); break; case @"DistanceSpacing":