Skip to content

Commit

Permalink
- Removed support for not used or unsecure SoundSources.
Browse files Browse the repository at this point in the history
  • Loading branch information
DxsSucuk committed Apr 26, 2022
1 parent d9b0db0 commit 5739fd9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/de/presti/ree6/music/MusicWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager;
import com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager;
import com.sedmelluq.discord.lavaplayer.source.AudioSourceManagers;
import com.sedmelluq.discord.lavaplayer.source.bandcamp.BandcampAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.soundcloud.SoundCloudAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
Expand Down Expand Up @@ -39,9 +43,11 @@ public class MusicWorker {
public MusicWorker() {
musicManagers = new HashMap<>();
playerManager = new DefaultAudioPlayerManager();

AudioSourceManagers.registerRemoteSources(playerManager);
AudioSourceManagers.registerLocalSource(playerManager);
playerManager.registerSourceManager(SoundCloudAudioSourceManager.createDefault());
playerManager.registerSourceManager(new BandcampAudioSourceManager());
playerManager.registerSourceManager(new VimeoAudioSourceManager());
playerManager.registerSourceManager(new TwitchStreamAudioSourceManager());
playerManager.registerSourceManager(new YoutubeAudioSourceManager());
}

/**
Expand Down

0 comments on commit 5739fd9

Please sign in to comment.