mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 16:03:01 +08:00
Only add set if ID is 0
This commit is contained in:
parent
418ae24fea
commit
6661195e92
@ -125,6 +125,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
BeatmapSetInfo set = getBeatmapSet(p);
|
BeatmapSetInfo set = getBeatmapSet(p);
|
||||||
|
|
||||||
|
if (set.ID == 0)
|
||||||
sets.Push(set);
|
sets.Push(set);
|
||||||
|
|
||||||
// We may or may not want to delete the file depending on where it is stored.
|
// We may or may not want to delete the file depending on where it is stored.
|
||||||
@ -193,7 +194,7 @@ namespace osu.Game.Database
|
|||||||
BeatmapSetAdded?.Invoke(existing);
|
BeatmapSetAdded?.Invoke(existing);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
var beatmapSet = new BeatmapSetInfo
|
var beatmapSet = new BeatmapSetInfo
|
||||||
@ -233,7 +234,6 @@ namespace osu.Game.Database
|
|||||||
connection.BeginTransaction();
|
connection.BeginTransaction();
|
||||||
|
|
||||||
foreach (var s in beatmapSets)
|
foreach (var s in beatmapSets)
|
||||||
if (s != null)
|
|
||||||
{
|
{
|
||||||
connection.InsertWithChildren(s, true);
|
connection.InsertWithChildren(s, true);
|
||||||
BeatmapSetAdded?.Invoke(s);
|
BeatmapSetAdded?.Invoke(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user