Skip to content

Commit

Permalink
disable all sources by default
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Oct 23, 2022
1 parent da6b00a commit 77f5d60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class LavaSrcPlugin implements AudioPlayerManagerConfiguration {
private final DeezerConfig deezerConfig;

public LavaSrcPlugin(LavaSrcConfig pluginConfig, SourcesConfig sourcesConfig, SpotifyConfig spotifyConfig, AppleMusicConfig appleMusicConfig, DeezerConfig deezerConfig, YandexMusicConfig yandexMusicConfig) {
log.info("Loading LavaSrc-Plugin...");
log.info("Loading LavaSrc plugin...");
this.pluginConfig = pluginConfig;
this.sourcesConfig = sourcesConfig;
this.spotifyConfig = spotifyConfig;
Expand All @@ -36,19 +36,19 @@ public LavaSrcPlugin(LavaSrcConfig pluginConfig, SourcesConfig sourcesConfig, Sp
@Override
public AudioPlayerManager configure(AudioPlayerManager manager) {
if (this.sourcesConfig.isSpotify()) {
log.info("Loading Spotify-SourceManager...");
log.info("Registering Spotify audio source manager...");
manager.registerSourceManager(new SpotifySourceManager(this.pluginConfig.getProviders(), this.spotifyConfig.getClientId(), this.spotifyConfig.getClientSecret(), this.spotifyConfig.getCountryCode(), manager));
}
if (this.sourcesConfig.isAppleMusic()) {
log.info("Loading Apple-Music-SourceManager...");
log.info("Registering Apple Music audio source manager...");
manager.registerSourceManager(new AppleMusicSourceManager(this.pluginConfig.getProviders(), this.appleMusicConfig.getCountryCode(), manager));
}
if (this.sourcesConfig.isDeezer()) {
log.info("Loading Deezer-SourceManager...");
log.info("Registering Deezer audio source manager...");
manager.registerSourceManager(new DeezerAudioSourceManager(this.deezerConfig.getMasterDecryptionKey()));
}
if (this.sourcesConfig.isYandexMusic()) {
log.info("Loading Yandex-Music-SourceManager...");
log.info("Registering Yandex Music audio source manager...");
manager.registerSourceManager(new YandexMusicSourceManager(this.yandexMusicConfig.getAccessToken()));
}
return manager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
@Component
public class SourcesConfig {

private boolean spotify = true;
private boolean appleMusic = true;
private boolean yandexMusic = true;
private boolean deezer = true;
private boolean spotify = false;
private boolean appleMusic = false;
private boolean deezer = false;
private boolean yandexMusic = false;

public boolean isSpotify() {
return this.spotify;
Expand Down

0 comments on commit 77f5d60

Please sign in to comment.