Mr-Robot-Discord-Bot / Mr-Robot

Multi-Purpose powerfull Discord Bot
https://discord.com/oauth2/authorize?client_id=1239962447285063691
GNU General Public License v3.0
3 stars 2 forks source link

fix(bug): music player replace playlists song after search_play #21

Closed KnownBlackHat closed 2 months ago

KnownBlackHat commented 2 months ago

Whenever music was player via search argument and during the song when play command was again invoked with playlist_name argument then a all playlist track was skipped and ended up playing last track in playlist.

Potential Reason: When such thing was performed then this might ends up with multiple track end event get dispatched (might be meta data fetching process end would be marked as track end)

Solution: Before popping track form queue in on_track_end handler, placing a check like if event.player.reason == ReasonType.REPLACE: return works