Skip to content

Commit

Permalink
Update a bit of code
Browse files Browse the repository at this point in the history
  • Loading branch information
ErdbeerbaerLP committed Jul 11, 2024
1 parent 1d3daaf commit 6bdb6c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/java/com/jagrosh/jmusicbot/BotConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import net.dv8tion.jda.api.OnlineStatus;
import net.dv8tion.jda.api.entities.Activity;

import javax.swing.*;

/**
*
*
Expand Down Expand Up @@ -393,4 +395,8 @@ public Config getTransforms()
{
return transforms;
}

public boolean isSpotifyEnabled() {
return !getSpotifyClientID().isEmpty() && getSpotifyClientSecret().isEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void init()
registerSourceManager(new NicoAudioSourceManager());
registerSourceManager(new HttpAudioSourceManager(MediaContainerRegistry.DEFAULT_REGISTRY));

if (!bot.getConfig().getSpotifyClientID().isEmpty() && !bot.getConfig().getSpotifyClientSecret().isEmpty()) {
if (bot.getConfig().isSpotifyEnabled()) {
final SpotifySourceManager spotify = new SpotifySourceManager(null, bot.getConfig().getSpotifyClientID(), bot.getConfig().getSpotifyClientSecret(), "DE", this);
spotify.setPlaylistPageLimit(18);
spotify.setAlbumPageLimit(18);
Expand Down

0 comments on commit 6bdb6c3

Please sign in to comment.