Slightly clean up archive readers + decoders. Read beatmap version into BeatmapInfo.

This commit is contained in:
smoogipooo
2017-04-03 20:26:46 +09:00
parent 91eec9e8fc
commit 19b5555ef2
11 changed files with 61 additions and 73 deletions

View File

@ -34,12 +34,14 @@ namespace osu.Game.Database
using (var stream = new StreamReader(reader.GetStream(BeatmapInfo.Path)))
{
decoder = BeatmapDecoder.GetDecoder(stream);
beatmap = decoder?.Decode(stream);
beatmap = decoder.Decode(stream);
}
if (WithStoryboard && beatmap != null && BeatmapSetInfo.StoryboardFile != null)
using (var stream = new StreamReader(reader.GetStream(BeatmapSetInfo.StoryboardFile)))
decoder.Decode(stream, beatmap);
if (beatmap == null || !WithStoryboard || BeatmapSetInfo.StoryboardFile == null)
return beatmap;
using (var stream = new StreamReader(reader.GetStream(BeatmapSetInfo.StoryboardFile)))
decoder.Decode(stream, beatmap);
}
return beatmap;