This commit is contained in:
Androz2091 2020-06-25 18:46:24 +02:00
parent 3b78249c76
commit aa1b364a2e

View file

@ -811,6 +811,8 @@ class Player {
seek: currentStreamTime seek: currentStreamTime
}) })
setTimeout(() => { setTimeout(() => {
if (queue.stream) queue.stream.destroy()
queue.stream = newStream
queue.voiceConnection.play(newStream, { queue.voiceConnection.play(newStream, {
type: 'opus' type: 'opus'
}) })
@ -856,7 +858,6 @@ class Player {
const nowPlaying = queue.playing = queue.repeatMode ? wasPlaying : queue.tracks.shift() const nowPlaying = queue.playing = queue.repeatMode ? wasPlaying : queue.tracks.shift()
// Reset lastSkipped state // Reset lastSkipped state
queue.lastSkipped = false queue.lastSkipped = false
this._playYTDLStream(queue, false).then(() => { this._playYTDLStream(queue, false).then(() => {
// Emit trackChanged event // Emit trackChanged event
if (!firstPlay) { if (!firstPlay) {