File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
src/main/java/lavalink/server/config Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ lavalink:
1919 bufferDurationMs: 400
2020 youtubePlaylistLoadLimit: 6 # Number of pages at 100 each
2121 youtubeSearchEnabled: true
22+ soundcloudSearchEnabled: true
2223 gc-warnings: true
2324
2425metrics:
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public Supplier<AudioPlayerManager> audioPlayerManagerSupplier(AudioSourcesConfi
3838 audioPlayerManager .registerSourceManager (youtube );
3939 }
4040 if (sources .isBandcamp ()) audioPlayerManager .registerSourceManager (new BandcampAudioSourceManager ());
41- if (sources .isSoundcloud ()) audioPlayerManager .registerSourceManager (new SoundCloudAudioSourceManager ());
41+ if (sources .isSoundcloud ()) audioPlayerManager .registerSourceManager (new SoundCloudAudioSourceManager (serverConfig . isSoundcloudSearchEnabled () ));
4242 if (sources .isTwitch ()) audioPlayerManager .registerSourceManager (new TwitchStreamAudioSourceManager ());
4343 if (sources .isVimeo ()) audioPlayerManager .registerSourceManager (new VimeoAudioSourceManager ());
4444 if (sources .isMixer ()) audioPlayerManager .registerSourceManager (new BeamAudioSourceManager ());
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public class ServerConfig {
3939 private Integer youtubePlaylistLoadLimit ;
4040 private boolean gcWarnings = true ;
4141 private boolean youtubeSearchEnabled = true ;
42+ private boolean soundcloudSearchEnabled = true ;
4243
4344 public String getPassword () {
4445 return password ;
@@ -93,4 +94,12 @@ public boolean isYoutubeSearchEnabled() {
9394 public void setYoutubeSearchEnabled (boolean youtubeSearchEnabled ) {
9495 this .youtubeSearchEnabled = youtubeSearchEnabled ;
9596 }
97+
98+ public boolean isSoundcloudSearchEnabled () {
99+ return soundcloudSearchEnabled ;
100+ }
101+
102+ public void setSoundcloudSearchEnabled (boolean soundcloudSearchEnabled ) {
103+ this .soundcloudSearchEnabled = soundcloudSearchEnabled ;
104+ }
96105}
You can’t perform that action at this time.
0 commit comments