🐛 fix playlists loading only first audio
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m41s
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m41s
This commit is contained in:
parent
c112781ee6
commit
f58669e522
@ -11,6 +11,7 @@ import net.dv8tion.jda.api.entities.Guild;
|
||||
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class PlayerManager {
|
||||
@ -51,9 +52,14 @@ public class PlayerManager {
|
||||
|
||||
@Override
|
||||
public void playlistLoaded(AudioPlaylist playlist) {
|
||||
final AudioTrack track = playlist.getTracks().get(0);
|
||||
musicManager.scheduler.queue(track);
|
||||
channel.sendMessage("Ajout à la file d'attente: `" + track.getInfo().title + "`").queue();
|
||||
List<AudioTrack> tracks = playlist.getTracks();
|
||||
|
||||
channel.sendMessage(
|
||||
"Ajout à la file d'attente: `" + playlist.getName() + "` - " + tracks.size() + " musiques.")
|
||||
.queue();
|
||||
|
||||
for (AudioTrack track : tracks)
|
||||
musicManager.scheduler.queue(track);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user