From bef7d3ed838a3da04442c4ce32678bc0e22b9bf1 Mon Sep 17 00:00:00 2001 From: casko1 Date: Wed, 31 Jul 2024 21:05:42 +0200 Subject: [PATCH] Add additional clients (cherry picked from commit bb58835445d0bd59611ed1194e1b8c8d3aeb1cd6) --- .../bot/music/lavaplayer/PlayerManager.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/casko1/wheelbarrow/bot/music/lavaplayer/PlayerManager.java b/src/main/java/com/casko1/wheelbarrow/bot/music/lavaplayer/PlayerManager.java index 67eadf8..ad1a0a0 100644 --- a/src/main/java/com/casko1/wheelbarrow/bot/music/lavaplayer/PlayerManager.java +++ b/src/main/java/com/casko1/wheelbarrow/bot/music/lavaplayer/PlayerManager.java @@ -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; @@ -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);