mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:02:57 +08:00
Fix scores without an online ID not always presenting correctly
This commit is contained in:
parent
5fa820cdd4
commit
ece5a9622e
@ -265,7 +265,16 @@ 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.
|
||||||
var databasedScoreInfo = ScoreManager.Query(s => s.OnlineScoreID == score.OnlineScoreID);
|
var databasedScoreInfo = score.OnlineScoreID != null
|
||||||
|
? ScoreManager.Query(s => s.OnlineScoreID == score.OnlineScoreID)
|
||||||
|
: ScoreManager.Query(s => s.Hash == score.Hash);
|
||||||
|
|
||||||
|
if (databasedScoreInfo == null)
|
||||||
|
{
|
||||||
|
Logger.Log("The requested score could not be found locally.", LoggingTarget.Information);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var databasedScore = ScoreManager.GetScore(databasedScoreInfo);
|
var databasedScore = ScoreManager.GetScore(databasedScoreInfo);
|
||||||
|
|
||||||
if (databasedScore.Replay == null)
|
if (databasedScore.Replay == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user