Wavelink icon indicating copy to clipboard operation
Wavelink copied to clipboard

Player.is_playing always returns False after track replace

Open wladbelsky opened this issue 2 years ago • 5 comments

Was broken in this commit: https://github.com/PythonistaGuild/Wavelink/commit/f126755662cdf17199b7814dbe4abcb5f038966b After first track has been replaced with Player.play(track), track_end event triggered after Player.play done. So, after first track replaced, Player._source is always None and Player.is_playing() always returns False.

Consider changing code from commit above to something like this:

if event == 'track_end' and payload.get('reason') == 'FINISHED':
    player._source = None

wladbelsky avatar Apr 23 '22 10:04 wladbelsky

I can confirm that this is an issue.

TechFun4 avatar Apr 28 '22 07:04 TechFun4

if event == 'track_end' and payload.get('reason') != 'REPLACED':
    player._source = None

would also do.

TechFun4 avatar Apr 30 '22 01:04 TechFun4

Any progress on this getting fixed yet? It completely breaks any sort of skipping logic.

iiPythonx avatar May 26 '22 15:05 iiPythonx

Any progress on this getting fixed yet? It completely breaks any sort of skipping logic.

Don't see any change in the master branch.. Manually modified it to fix it. OP's solution worked for me.

mubasshir-ch avatar May 26 '22 15:05 mubasshir-ch

could it be that track end event is triggered late i.e after the player start playing next track!

Hashed0719 avatar May 28 '22 12:05 Hashed0719

i don't think your fix works on my machine? (its not permanent)
still getting track replaced though there's check if its playing

timelessnesses avatar Oct 26 '22 16:10 timelessnesses

bump repair plz m(_ _)m

26939095 avatar Dec 22 '22 04:12 26939095