1
0
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:
Dean Herbert 2017-03-17 18:57:24 +09:00
parent ba73968303
commit 3401759665
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -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>