mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Use hash as fallback
This commit is contained in:
@ -427,7 +427,12 @@ namespace osu.Game
|
|||||||
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
|
// The given ScoreInfo may have missing properties if it was retrieved from online data. Re-retrieve it from the database
|
||||||
// to ensure all the required data for presenting a replay are present.
|
// to ensure all the required data for presenting a replay are present.
|
||||||
// Todo: This should use the OnlineScoreID if available, however lazer scores are imported without an OnlineScoreID for the time being (see Player.ImportScore()).
|
// Todo: This should use the OnlineScoreID if available, however lazer scores are imported without an OnlineScoreID for the time being (see Player.ImportScore()).
|
||||||
var databasedScoreInfo = ScoreManager.Query(s => s.Hash == score.Hash);
|
ScoreInfo databasedScoreInfo = null;
|
||||||
|
|
||||||
|
if (score.OnlineScoreID != null)
|
||||||
|
databasedScoreInfo = ScoreManager.Query(s => s.OnlineScoreID == score.OnlineScoreID);
|
||||||
|
|
||||||
|
databasedScoreInfo ??= ScoreManager.Query(s => s.Hash == score.Hash);
|
||||||
|
|
||||||
if (databasedScoreInfo == null)
|
if (databasedScoreInfo == null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user