mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Don't batch imports for now.
This commit is contained in:
parent
ba73968303
commit
3401759665
@ -123,16 +123,15 @@ namespace osu.Game.Database
|
||||
/// <param name="paths">Multiple locations on disk</param>
|
||||
public void Import(IEnumerable<string> paths)
|
||||
{
|
||||
Stack<BeatmapSetInfo> sets = new Stack<BeatmapSetInfo>();
|
||||
|
||||
foreach (string p in paths)
|
||||
{
|
||||
try
|
||||
{
|
||||
BeatmapSetInfo set = getBeatmapSet(p);
|
||||
|
||||
//If we have an ID then we already exist in the database.
|
||||
if (set.ID == 0)
|
||||
sets.Push(set);
|
||||
Import(new[] { set });
|
||||
|
||||
// We may or may not want to delete the file depending on where it is stored.
|
||||
// e.g. reconstructing/repairing database with beatmaps from default storage.
|
||||
@ -152,9 +151,7 @@ namespace osu.Game.Database
|
||||
e = e.InnerException ?? e;
|
||||
Logger.Error(e, @"Could not import beatmap set");
|
||||
}
|
||||
|
||||
// Batch commit with multiple sets to database
|
||||
Import(sets);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user