File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed
plugin/src/main/java/dev/lavalink/youtube/plugin Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 11package dev .lavalink .youtube .plugin ;
22
3- import dev .lavalink .youtube .YoutubeAudioSourceManager ;
43import dev .lavalink .youtube .clients .ClientOptions ;
54import dev .lavalink .youtube .clients .skeleton .Client ;
65import org .slf4j .Logger ;
1312public interface ClientProvider {
1413 Logger log = LoggerFactory .getLogger (ClientProvider .class );
1514
16- default String [] getDefaultClients () {
17- String [] clientIdentifiers = new String [YoutubeAudioSourceManager .DEFAULT_CLIENTS .length ];
18-
19- for (int i = 0 ; i < clientIdentifiers .length ; i ++) {
20- clientIdentifiers [i ] = YoutubeAudioSourceManager .DEFAULT_CLIENTS [i ].getIdentifier ();
21- }
22-
23- return clientIdentifiers ;
24- }
25-
2615 Client [] getClients (String [] clients , OptionsProvider optionsProvider );
2716
2817 default Client [] getClients (ClientReference [] clientValues ,
Original file line number Diff line number Diff line change @@ -155,11 +155,11 @@ public AudioPlayerManager configure(AudioPlayerManager audioPlayerManager) {
155155 Client [] clients ;
156156
157157 if (youtubeConfig == null ) {
158- log .warn ("Config value \" youtube.clients \" was not specified , default clients will be used." );
158+ log .warn ("Missing youtube config , default clients will be used." );
159159 clients = YoutubeAudioSourceManager .DEFAULT_CLIENTS ;
160160 } else {
161- if (clientProvider == null ) {
162- log .warn ("ClientProvider instance is missing ! Default clients will be used." );
161+ if (clientProvider == null || youtubeConfig . getClients () == null ) {
162+ log .warn ("Missing \" youtube.clients \" or ClientProvider not initialised ! Default clients will be used." );
163163 clients = YoutubeAudioSourceManager .DEFAULT_CLIENTS ;
164164 } else {
165165 clients = clientProvider .getClients (youtubeConfig .getClients (), this ::getOptionsForClient );
You can’t perform that action at this time.
0 commit comments