mirror of
https://github.com/ppy/osu
synced 2025-01-03 12:52:10 +00:00
Fix song select.
This commit is contained in:
parent
d3c1520a2d
commit
f2174054ea
@ -271,12 +271,14 @@ namespace osu.Game.Database
|
||||
{
|
||||
var beatmapSetInfo = Query<BeatmapSetInfo>().FirstOrDefault(s => s.ID == beatmapInfo.BeatmapSetInfoID);
|
||||
|
||||
//we need metadata
|
||||
GetChildren(beatmapSetInfo);
|
||||
|
||||
if (beatmapSetInfo == null)
|
||||
throw new InvalidOperationException($@"Beatmap set {beatmapInfo.BeatmapSetInfoID} is not in the local database.");
|
||||
|
||||
//we need metadata
|
||||
GetChildren(beatmapSetInfo);
|
||||
foreach (var b in beatmapSetInfo.Beatmaps)
|
||||
GetChildren(b);
|
||||
|
||||
if (beatmapInfo.Metadata == null)
|
||||
beatmapInfo.Metadata = beatmapSetInfo.Metadata;
|
||||
|
||||
|
@ -145,7 +145,7 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
int startIndex = groups.IndexOf(selectedGroup);
|
||||
int startIndex = Math.Max(0, groups.IndexOf(selectedGroup));
|
||||
int index = startIndex;
|
||||
|
||||
do
|
||||
@ -221,7 +221,12 @@ namespace osu.Game.Screens.Select
|
||||
private BeatmapGroup createGroup(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
database.GetChildren(beatmapSet);
|
||||
beatmapSet.Beatmaps.ForEach(b => { if (b.Metadata == null) b.Metadata = beatmapSet.Metadata; });
|
||||
beatmapSet.Beatmaps.ForEach(b =>
|
||||
{
|
||||
database.GetChildren(b);
|
||||
if (b.Metadata == null)
|
||||
b.Metadata = beatmapSet.Metadata;
|
||||
});
|
||||
|
||||
return new BeatmapGroup(beatmapSet, database)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user