add check
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 37s

This commit is contained in:
Lee 2024-08-01 01:12:23 +01:00
parent 09834e9eac
commit 900ccba67e

View File

@ -218,6 +218,13 @@ public class ScoreSaberPlatform extends Platform {
log.warn("Failed to update leaderboard '{}' for platform '{}'", id, this.getPlatform().getPlatformName());
continue;
}
if (leaderboard.getStars() == 0) { // Check if the leaderboard is ranked
log.warn("Leaderboard '{}' for platform '{}' is not ranked, skipping updating the score pp values",
id,
this.getPlatform().getPlatformName()
);
continue;
}
List<TrackedScore> toUpdate = scores.stream().filter(score -> {
if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches