Skip to content

Commit

Permalink
Use yt source manager from lldevs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidffa committed Apr 26, 2024
1 parent 9b8b4e5 commit 843ac1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions D4rkBotKtMain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ dependencies {
implementation(libs.opus)
implementation(libs.jda.ktx)
implementation(libs.lavaplayer)
implementation(libs.lavaplayer.yt)
implementation(libs.lavaplayer.yt.thumbnail)
implementation(libs.jda.nas)

// Lavaplayer filters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.sedmelluq.discord.lavaplayer.source.tiktok.TiktokAudioSourceManager
import com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager
import com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager
import com.sedmelluq.discord.lavaplayer.source.yamusic.YandexMusicAudioSourceManager
import com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException
import com.sedmelluq.discord.lavaplayer.tools.io.MessageInput
import com.sedmelluq.discord.lavaplayer.tools.io.MessageOutput
Expand All @@ -27,6 +26,12 @@ import com.github.davidffa.d4rkbotkt.Credentials
import com.github.davidffa.d4rkbotkt.audio.sources.Deezer
import com.github.davidffa.d4rkbotkt.audio.sources.Spotify
import com.github.davidffa.d4rkbotkt.utils.Utils
import dev.lavalink.youtube.YoutubeAudioSourceManager
import dev.lavalink.youtube.clients.AndroidWithThumbnail
import dev.lavalink.youtube.clients.IosWithThumbnail
import dev.lavalink.youtube.clients.MusicWithThumbnail
import dev.lavalink.youtube.clients.TvHtml5EmbeddedWithThumbnail
import dev.lavalink.youtube.clients.WebWithThumbnail
import net.dv8tion.jda.api.Permission
import net.dv8tion.jda.api.entities.Guild
import net.dv8tion.jda.api.entities.Member
Expand All @@ -47,7 +52,8 @@ object PlayerManager {
private val deezer = Deezer()

init {
audioPlayerManager.registerSourceManager(YoutubeAudioSourceManager(true, Credentials.YTEMAIL, Credentials.YTPASS))
// audioPlayerManager.registerSourceManager(YoutubeAudioSourceManager(true, Credentials.YTEMAIL, Credentials.YTPASS))
audioPlayerManager.registerSourceManager(YoutubeAudioSourceManager(true, MusicWithThumbnail(), WebWithThumbnail(), AndroidWithThumbnail(), TvHtml5EmbeddedWithThumbnail()))
audioPlayerManager.registerSourceManager(SoundCloudAudioSourceManager.createDefault(true))
audioPlayerManager.registerSourceManager(BandcampAudioSourceManager())
audioPlayerManager.registerSourceManager(VimeoAudioSourceManager())
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ dependencyResolutionManagement {
library("jda-core", "net.dv8tion", "JDA").version("5.0.0-beta.21")
library("opus", "com.github.davidffa", "opus-java").version("c6194b1")
library("jda-ktx", "com.github.minndevelopment", "jda-ktx").version("78dbf82")
library("lavaplayer", "com.github.davidffa", "lavaplayer-fork").version("1154e56")
library("lavaplayer", "com.github.davidffa", "lavaplayer-fork").version("1fa3cff")
library("lavaplayer-yt", "com.github.lavalink-devs.youtube-source", "common").version("1.0.5")
library("lavaplayer-yt-thumbnail", "com.github.lavalink-devs.youtube-source", "lldevs").version("1.0.5")
library("jda-nas", "com.github.davidffa", "jda-nas-fork").version("1.0.3")

// Lavaplayer audio filters
Expand Down

0 comments on commit 843ac1a

Please sign in to comment.