Remove Import(ArchiveReader) and redirect existing usages to Import(ImportTask)

This commit is contained in:
Dean Herbert
2022-06-20 15:14:57 +09:00
parent 2edd56ad17
commit a6c8a832aa
8 changed files with 39 additions and 63 deletions

View File

@ -19,7 +19,6 @@ using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Database;
using osu.Game.IO.Archives;
using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
@ -141,7 +140,7 @@ namespace osu.Game.Screens.Menu
{
// if we detect that the theme track or beatmap is unavailable this is either first startup or things are in a bad state.
// this could happen if a user has nuked their files store. for now, reimport to repair this.
var import = beatmaps.Import(new ZipArchiveReader(game.Resources.GetStream($"Tracks/{BeatmapFile}"), BeatmapFile)).GetResultSafely();
var import = beatmaps.Import(new ImportTask(game.Resources.GetStream($"Tracks/{BeatmapFile}"), BeatmapFile)).GetResultSafely();
import?.PerformWrite(b => b.Protected = true);