mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Slightly clean up archive readers + decoders. Read beatmap version into BeatmapInfo.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user