1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 04:59:52 +08:00

fixes MusicController constantly trying to start a track

In Detail:
It tried to start a track if the current one ended even if no BeatmapSets were present.
Also if only one BeatmapSet is present if will loop by itself now.
This commit is contained in:
Aergwyn
2017-12-03 14:03:43 +01:00
Unverified
parent 5a6f59bed0
commit a1dbd7916b
2 changed files with 7 additions and 1 deletions
@@ -149,6 +149,12 @@ namespace osu.Game.Overlays.Music
private void playSpecified(BeatmapInfo info)
{
beatmapBacking.Value = beatmaps.GetWorkingBeatmap(info, beatmapBacking);
if (BeatmapSets.Count() == 1)
beatmapBacking.Value.Track.Looping = true;
else
beatmapBacking.Value.Track.Looping = false;
beatmapBacking.Value.Track.Start();
}
}
+1 -1
View File
@@ -251,7 +251,7 @@ namespace osu.Game.Overlays
playButton.Icon = track.IsRunning ? FontAwesome.fa_pause_circle_o : FontAwesome.fa_play_circle_o;
if (track.HasCompleted && !track.Looping && !beatmapBacking.Disabled)
if (track.HasCompleted && !beatmapBacking.Disabled && playlist.BeatmapSets.Any())
next();
}
else