Skip to content

Commit

Permalink
Update youtube source (#134)
Browse files Browse the repository at this point in the history
* Update youtube source

* Add more music clients

* Update youtube-source and include WebEmbedded client

* Update youtube source (again)
  • Loading branch information
1Revenger1 authored Aug 26, 2024
1 parent ecace36 commit b411fdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0")
implementation("dev.lavalink.youtube:v2:1.7.2")
implementation("org.mongodb:mongodb-driver-sync:4.8.2")
implementation ("org.scilab.forge:jlatexmath:1.0.7")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +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.AndroidWithThumbnail;
import dev.lavalink.youtube.clients.MusicWithThumbnail;
import dev.lavalink.youtube.clients.WebWithThumbnail;
import dev.lavalink.youtube.clients.*;

import java.util.concurrent.ConcurrentHashMap;

Expand All @@ -21,7 +19,10 @@ 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 TvHtml5EmbeddedWithThumbnail(),
new WebEmbeddedWithThumbnail(),
new WebWithThumbnail()
);

Expand Down

0 comments on commit b411fdf

Please sign in to comment.