api: oopsie doodle
Some checks failed
Deploy API / docker (17, 3.8.5) (push) Failing after 30s

This commit is contained in:
Lee 2024-08-05 05:59:41 +01:00
parent 54bdf532fe
commit 64b6ef1a7f

@ -200,8 +200,8 @@ public class ScoreService {
String[] modifiers = !score.getModifiers().isEmpty() ? score.getModifiers().split(",") : new String[0];
DeviceHeadset deviceHmd;
boolean legacyDeviceInformation = score.getDeviceHmd() == null && score.getHmd() != 0;
if (!legacyDeviceInformation) { // Use the new format
boolean useLegacyHmdIdentification = score.getDeviceHmd() == null && score.getHmd() != 0;
if (!useLegacyHmdIdentification) { // Use the new format
deviceHmd = DeviceHeadset.getByName(score.getDeviceHmd());
} else { // Use the legacy format (only includes the HMD, missing controller information)
deviceHmd = DeviceHeadset.getByFallbackValue(score.getHmd());
@ -232,7 +232,9 @@ public class ScoreService {
);
this.saveScore(user, scoreSaberScore);
this.logScore(Platform.Platforms.SCORESABER, Leaderboard.getFromScoreSaberToken(leaderboard), scoreSaberScore, user);
log.info(" - Using legacy device information, headset found: {} (missing controller information)", deviceHmd);
if (useLegacyHmdIdentification) {
log.info(" - Using legacy device information, headset found: {} (missing controller information)", deviceHmd);
}
}
/**