mirror of https://github.com/ppy/osu
Fix song select.
This commit is contained in:
parent
d3c1520a2d
commit
f2174054ea
|
@ -271,12 +271,14 @@ public WorkingBeatmap GetWorkingBeatmap(BeatmapInfo beatmapInfo, WorkingBeatmap
|
|||
{
|
||||
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 @@ public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
|||
}
|
||||
}
|
||||
|
||||
int startIndex = groups.IndexOf(selectedGroup);
|
||||
int startIndex = Math.Max(0, groups.IndexOf(selectedGroup));
|
||||
int index = startIndex;
|
||||
|
||||
do
|
||||
|
@ -221,7 +221,12 @@ public void Filter(FilterCriteria newCriteria = null, bool debounce = true)
|
|||
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