Skip to content

Commit

Permalink
Add additional clients
Browse files Browse the repository at this point in the history
(cherry picked from commit bb58835)
  • Loading branch information
casko1 committed Jul 31, 2024
1 parent b71952d commit bef7d3e
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import com.wrapper.spotify.SpotifyApi;
import com.wrapper.spotify.exceptions.SpotifyWebApiException;
import com.wrapper.spotify.model_objects.credentials.ClientCredentials;
import dev.lavalink.youtube.clients.MusicWithThumbnail;
import dev.lavalink.youtube.clients.WebWithThumbnail;
import dev.lavalink.youtube.clients.*;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.channel.concrete.TextChannel;
Expand Down Expand Up @@ -59,7 +58,14 @@ public PlayerManager() throws IOException, ParseException, SpotifyWebApiExceptio
this.clientCredentials = spotifyApi.clientCredentials().build().execute();

this.spotifyApi.setAccessToken(clientCredentials.getAccessToken());
YoutubeAudioSourceManager youtubeSourceManager = new YoutubeAudioSourceManager(true, new MusicWithThumbnail(), new WebWithThumbnail());
YoutubeAudioSourceManager youtubeSourceManager = new YoutubeAudioSourceManager(
true,
new TvHtml5EmbeddedWithThumbnail(),
new MusicWithThumbnail(),
new WebWithThumbnail(),
new AndroidTestsuiteWithThumbnail(),
new AndroidMusicWithThumbnail()
);
this.audioPlayerManager.registerSourceManager(youtubeSourceManager);
this.audioPlayerManager.registerSourceManager(SoundCloudAudioSourceManager.createDefault());
AudioSourceManagers.registerLocalSource(this.audioPlayerManager);
Expand Down

0 comments on commit bef7d3e

Please sign in to comment.