diff --git a/app.py b/app.py index 0ed3fdd..26a3cb6 100644 --- a/app.py +++ b/app.py @@ -789,7 +789,13 @@ def route_api_leaderboard_submit(): else: score_obj = score_data - score_value = int(score_obj.get('score', 0)) + # Check for 'score' first, then 'points' + # Frontend usually sends 'points' + score_val = score_obj.get('score') + if score_val is None: + score_val = score_obj.get('points') + + score_value = int(score_val or 0) except: return api_error('invalid_score_format') diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index 0674f69..cd2e48b 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -3335,7 +3335,9 @@ class SongSelect { }); } toLeaderboard() { - var songId = this.songs[this.selectedSong].id + var song = this.songs[this.selectedSong] + var songId = song.id || song.hash + // Allow leaderboard for any song with an ID (numeric or hash) if (!songId) { return