make spotify integration not stacktrace when spotify is not present
This commit is contained in:
parent
b281ec72a2
commit
6ce78541ef
1 changed files with 6 additions and 2 deletions
|
@ -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.");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue