diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 471696e592..7a543252dc 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -28,13 +28,20 @@ namespace osu.Game.Overlays private SpriteText title, artist; private OsuGameBase osuGame; private List playList; + private BeatmapDatabase database; private BeatmapSetInfo currentPlay; public AudioTrack CurrentTrack { get; set; }//TODO:gets exterally + + public MusicController(BeatmapDatabase db = null) + { + database = db; + } public override void Load(BaseGame game) { base.Load(game); osuGame = game as OsuGameBase; - playList = osuGame.Beatmaps.Query().ToList(); + if (database == null) database = osuGame.Beatmaps; + playList = database.Query().ToList(); currentPlay = playList.FirstOrDefault(); Width = 400; Height = 130;