diff --git a/build.gradle b/build.gradle index 2912c37..2a42672 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ dependencies { implementation("net.dv8tion:JDA:5.0.0-beta.23") implementation("ch.qos.logback:logback-classic:1.4.5") implementation("dev.arbjerg:lavaplayer:2.2.1") // https://github.com/lavalink-devs/lavaplayer - implementation("dev.lavalink.youtube:v2:1.5.2") + implementation("dev.lavalink.youtube:v2:1.7.0") implementation("org.mongodb:mongodb-driver-sync:4.8.2") implementation ("org.scilab.forge:jlatexmath:1.0.7") } diff --git a/src/main/java/com/wylxbot/wylx/Core/Music/WylxPlayerManager.java b/src/main/java/com/wylxbot/wylx/Core/Music/WylxPlayerManager.java index 4c7fc2d..fb22b93 100644 --- a/src/main/java/com/wylxbot/wylx/Core/Music/WylxPlayerManager.java +++ b/src/main/java/com/wylxbot/wylx/Core/Music/WylxPlayerManager.java @@ -5,10 +5,7 @@ import com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager; import com.sedmelluq.discord.lavaplayer.source.AudioSourceManagers; import dev.lavalink.youtube.YoutubeAudioSourceManager; -import dev.lavalink.youtube.clients.AndroidMusicWithThumbnail; -import dev.lavalink.youtube.clients.MusicWithThumbnail; -import dev.lavalink.youtube.clients.TvHtml5EmbeddedWithThumbnail; -import dev.lavalink.youtube.clients.WebWithThumbnail; +import dev.lavalink.youtube.clients.*; import java.util.concurrent.ConcurrentHashMap; @@ -22,10 +19,11 @@ private WylxPlayerManager() { // Use Youtube Source manager from youtube-source repo instead of built-in YoutubeAudioSourceManager ytSrcMgr = new YoutubeAudioSourceManager( /*allowSearch:*/ true, + new AndroidMusicWithThumbnail(), new MusicWithThumbnail(), - new WebWithThumbnail(), new TvHtml5EmbeddedWithThumbnail(), - new AndroidMusicWithThumbnail() + new WebEmbeddedWithThumbnail(), + new WebWithThumbnail() ); playerManager.registerSourceManager(ytSrcMgr);