diff --git a/src/main/java/cc/fascinated/bat/service/SpotifyService.java b/src/main/java/cc/fascinated/bat/service/SpotifyService.java index e631b65..8826111 100644 --- a/src/main/java/cc/fascinated/bat/service/SpotifyService.java +++ b/src/main/java/cc/fascinated/bat/service/SpotifyService.java @@ -188,7 +188,8 @@ public class SpotifyService { */ @SneakyThrows public void ensureValidToken(SpotifyProfile profile, BatUser user) { - if (profile.getExpiresAt() == null || profile.getExpiresAt() < System.currentTimeMillis()) { + // If the token is still valid, return + if (profile.getExpiresAt() > System.currentTimeMillis()) { return; } SpotifyApi api = new SpotifyApi.Builder()