make spotify integration not stacktrace when spotify is not present
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 1m25s
/ Build BaseBand Loader (push) Successful in 1m39s

This commit is contained in:
Jess H 2024-06-11 03:39:50 +01:00
parent b281ec72a2
commit 6ce78541ef
Signed by: UnixSystemV
GPG key ID: 9B21C50B68D67F19

View file

@ -44,6 +44,7 @@ public class Spotify extends Feature {
}
}
boolean connected = false;
@Override
public boolean canExist() {
@ -52,6 +53,7 @@ public class Spotify extends Feature {
@Override
public void onConnect() {
BaseBand.LOGGER.info("Connected to Spotify");
connected = true;
}
@Override
@ -76,8 +78,10 @@ public class Spotify extends Feature {
@Override
public void onDisconnect(Exception e) {
BaseBand.LOGGER.info("Disconnected from Spotify");
e.printStackTrace();
if(connected) {
connected = false;
BaseBand.LOGGER.info("Disconnected from Spotify.");
}
}
});