Skip to content

Commit

Permalink
Make the enabled option actually do something, remove null check on c…
Browse files Browse the repository at this point in the history
…lient init
  • Loading branch information
devoxin committed May 8, 2024
1 parent 5b586be commit 3558355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public YoutubeAudioSourceManager(boolean allowSearch,
this.allowSearch = allowSearch;
this.allowDirectVideoIds = allowDirectVideoIds;
this.allowDirectPlaylistIds = allowDirectPlaylistIds;
this.clients = clients == null ? new Client[0] : clients;
this.clients = clients;
this.cipherManager = new SignatureCipherManager();

YoutubeAccessTokenTracker tokenTracker = new YoutubeAccessTokenTracker(httpInterfaceManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ private AbstractRoutePlanner getRoutePlanner() {

@Override
public AudioPlayerManager configure(AudioPlayerManager audioPlayerManager) {
if (youtubeConfig != null && !youtubeConfig.getEnabled()) {
return audioPlayerManager;
}

final YoutubeAudioSourceManager source;
final boolean allowSearch = youtubeConfig == null || youtubeConfig.getAllowSearch();
final boolean allowDirectVideoIds = youtubeConfig == null || youtubeConfig.getAllowDirectVideoIds();
Expand Down

0 comments on commit 3558355

Please sign in to comment.