Wavelink
Wavelink copied to clipboard
Player.is_playing always returns False after track replace
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
I can confirm that this is an issue.
if event == 'track_end' and payload.get('reason') != 'REPLACED':
player._source = None
would also do.
Any progress on this getting fixed yet? It completely breaks any sort of skipping logic.
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.
could it be that track end event is triggered late i.e after the player start playing next track!
i don't think your fix works on my machine? (its not permanent)
still getting track replaced though there's check if its playing
bump repair plz m(_ _)m