From 671fab3dd793dc80735900be3f4b45baa94d09ff Mon Sep 17 00:00:00 2001 From: Duncan Sterken Date: Tue, 13 Feb 2018 09:02:09 +0100 Subject: [PATCH] Fix playlist repeating --- src/main/java/ml/duncte123/skybot/audio/TrackScheduler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ml/duncte123/skybot/audio/TrackScheduler.java b/src/main/java/ml/duncte123/skybot/audio/TrackScheduler.java index 232e54c35..a3336ccdf 100644 --- a/src/main/java/ml/duncte123/skybot/audio/TrackScheduler.java +++ b/src/main/java/ml/duncte123/skybot/audio/TrackScheduler.java @@ -124,8 +124,9 @@ public void onTrackEnd(AudioPlayer player, AudioTrack track, AudioTrackEndReason announceNextTrack(lastTrack); } else { logger.debug("a playlist....."); - queue(lastTrack.makeClone()); nextTrack(); + //Offer it to the queue to prevent the player from playing it + queue.offer(lastTrack.makeClone()); } } else { logger.debug("starting next track");