Fixed player function on end playback

This commit is contained in:
Manuel Cortez 2021-09-24 13:19:30 -05:00
parent 9bb85688bb
commit ebb400672f

View File

@ -122,7 +122,8 @@ class audioPlayer(object):
def player_function(self):
""" Check if the stream has reached the end of the file so it will play the next song. """
if self.player != None and self.player.is_playing == False and self.stopped == False and len(self.player) == self.player.position:
if self.player != None and self.player.is_playing == False and self.stopped == False and len(self.player)-self.player.position < 50000:
if self.queue_pos >= len(self.queue):
self.stopped = True
return