mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 12:42:54 +08:00
More robust metadata handling.
This commit is contained in:
parent
fd977cacb3
commit
ef5968e243
@ -70,6 +70,8 @@ namespace osu.Game.Database
|
|||||||
return BeatmapID == other?.BeatmapID;
|
return BeatmapID == other?.BeatmapID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AudioEquals(BeatmapInfo other) => BeatmapSet.Path == other.BeatmapSet.Path && Metadata.AudioFile == other.Metadata.AudioFile;
|
public bool AudioEquals(BeatmapInfo other) => other != null &&
|
||||||
|
BeatmapSet.Path == other.BeatmapSet.Path &&
|
||||||
|
(Metadata ?? BeatmapSet.Metadata).AudioFile == (other.Metadata ?? other.BeatmapSet.Metadata).AudioFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ namespace osu.Game.Overlays
|
|||||||
nextToPlay = playList[playListIndex++].Beatmaps[0];
|
nextToPlay = playList[playListIndex++].Beatmaps[0];
|
||||||
if (playListIndex == playList.Count) playListIndex = 0;
|
if (playListIndex == playList.Count) playListIndex = 0;
|
||||||
}
|
}
|
||||||
while (current?.BeatmapInfo.AudioEquals(nextToPlay) == true);
|
while (nextToPlay.AudioEquals(current?.BeatmapInfo));
|
||||||
|
|
||||||
play(nextToPlay, true);
|
play(nextToPlay, true);
|
||||||
appendToHistory(nextToPlay);
|
appendToHistory(nextToPlay);
|
||||||
|
Loading…
Reference in New Issue
Block a user