mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Add option to import from osu-stable
Also adds an option to delete all beatmaps for testing purposes.
This commit is contained in:
@ -390,5 +390,21 @@ namespace osu.Game.Beatmaps
|
||||
catch { return new TrackVirtual(); }
|
||||
}
|
||||
}
|
||||
|
||||
public void ImportFromStable()
|
||||
{
|
||||
|
||||
string stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"osu!", "Songs");
|
||||
if (!Directory.Exists(stableInstallPath))
|
||||
stableInstallPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".osu", "Songs");
|
||||
|
||||
if (!Directory.Exists(stableInstallPath))
|
||||
{
|
||||
Logger.Log("Couldn't find an osu!stable installation!", LoggingTarget.Information, LogLevel.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
Import(Directory.GetDirectories(stableInstallPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user