Fix: Use hash as fallback when song ID is not available
This commit is contained in:
@@ -985,7 +985,8 @@ class Scoresheet {
|
||||
var title = this.controller.selectedSong.originalTitle
|
||||
var hash = this.controller.selectedSong.hash
|
||||
var difficulty = this.resultsObj.difficulty
|
||||
var songId = this.controller.selectedSong.id
|
||||
// Use id if available, otherwise use hash
|
||||
var songId = this.controller.selectedSong.id || hash
|
||||
var oldScore = scoreStorage.get(hash, difficulty, true)
|
||||
var clearReached = this.controller.game.rules.clearReached(this.resultsObj.gauge)
|
||||
var crown = ""
|
||||
@@ -1001,6 +1002,7 @@ class Scoresheet {
|
||||
}
|
||||
this.leaderboardSubmitted = false
|
||||
|
||||
|
||||
if (!oldScore || oldScore.points <= this.resultsObj.points) {
|
||||
if (oldScore && (oldScore.crown === "gold" || oldScore.crown === "silver" && !crown)) {
|
||||
crown = oldScore.crown
|
||||
|
||||
Reference in New Issue
Block a user