mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Crentalise all import logic
This commit is contained in:
@ -115,21 +115,7 @@ namespace osu.Desktop
|
||||
|
||||
if (filePaths.Any(f => Path.GetExtension(f) != firstExtension)) return;
|
||||
|
||||
switch (firstExtension)
|
||||
{
|
||||
case ".osz":
|
||||
Task.Factory.StartNew(() => BeatmapManager.Import(filePaths), TaskCreationOptions.LongRunning);
|
||||
return;
|
||||
case ".osr":
|
||||
Task.Run(() =>
|
||||
{
|
||||
var score = ScoreStore.ReadReplayFile(filePaths.First());
|
||||
Schedule(() => LoadScore(score));
|
||||
});
|
||||
return;
|
||||
}
|
||||
Task.Factory.StartNew(() => Import(filePaths), TaskCreationOptions.LongRunning);
|
||||
}
|
||||
|
||||
private static readonly string[] allowed_extensions = { @".osz", @".osr" };
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user