mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Fix realm error. Apply OriginalBeatmapHash
on import
This commit is contained in:
@ -456,12 +456,6 @@ namespace osu.Game.Beatmaps
|
|||||||
if (transferCollections)
|
if (transferCollections)
|
||||||
beatmapInfo.TransferCollectionReferences(r, oldMd5Hash);
|
beatmapInfo.TransferCollectionReferences(r, oldMd5Hash);
|
||||||
|
|
||||||
//Unlinking all scores from this beatmap
|
|
||||||
r.All<ScoreInfo>().Where(s => s.BeatmapInfoID == beatmapInfo.ID).ForEach(s => s.BeatmapInfo = new BeatmapInfo());
|
|
||||||
|
|
||||||
//Linking all the previos scores
|
|
||||||
r.All<ScoreInfo>().Where(s => s.OriginalBeatmapHash == beatmapInfo.Hash).ForEach(s => s.BeatmapInfo = beatmapInfo);
|
|
||||||
|
|
||||||
ProcessBeatmap?.Invoke((liveBeatmapSet, false));
|
ProcessBeatmap?.Invoke((liveBeatmapSet, false));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ namespace osu.Game.Scoring.Legacy
|
|||||||
// before returning for database import, we must restore the database-sourced BeatmapInfo.
|
// before returning for database import, we must restore the database-sourced BeatmapInfo.
|
||||||
// if not, the clone operation in GetPlayableBeatmap will cause a dereference and subsequent database exception.
|
// if not, the clone operation in GetPlayableBeatmap will cause a dereference and subsequent database exception.
|
||||||
score.ScoreInfo.BeatmapInfo = workingBeatmap.BeatmapInfo;
|
score.ScoreInfo.BeatmapInfo = workingBeatmap.BeatmapInfo;
|
||||||
|
score.ScoreInfo.OriginalBeatmapHash = workingBeatmap.BeatmapInfo.Hash;
|
||||||
|
|
||||||
return score;
|
return score;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user