mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Move difficulty copy inside context retrieval
This commit is contained in:
@ -192,8 +192,6 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
var setInfo = beatmapInfo.BeatmapSet;
|
var setInfo = beatmapInfo.BeatmapSet;
|
||||||
|
|
||||||
beatmapInfo.BaseDifficulty.CopyFrom(beatmapContent.Difficulty);
|
|
||||||
|
|
||||||
using (var stream = new MemoryStream())
|
using (var stream = new MemoryStream())
|
||||||
{
|
{
|
||||||
using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true))
|
using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true))
|
||||||
@ -204,6 +202,8 @@ namespace osu.Game.Beatmaps
|
|||||||
using (ContextFactory.GetForWrite())
|
using (ContextFactory.GetForWrite())
|
||||||
{
|
{
|
||||||
beatmapInfo = setInfo.Beatmaps.Single(b => b.ID == beatmapInfo.ID);
|
beatmapInfo = setInfo.Beatmaps.Single(b => b.ID == beatmapInfo.ID);
|
||||||
|
beatmapInfo.BaseDifficulty.CopyFrom(beatmapContent.Difficulty);
|
||||||
|
|
||||||
var metadata = beatmapInfo.Metadata ?? setInfo.Metadata;
|
var metadata = beatmapInfo.Metadata ?? setInfo.Metadata;
|
||||||
|
|
||||||
// grab the original file (or create a new one if not found).
|
// grab the original file (or create a new one if not found).
|
||||||
|
Reference in New Issue
Block a user