From eaa70ef818b9898c52322c8a33c06a1ed17822e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Sat, 14 May 2016 20:33:16 -0500 Subject: [PATCH] audiplayer: play_all calls stop() at first for clearing stuff and avoiding errors --- src/controller/player.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/controller/player.py b/src/controller/player.py index a52d1c7..bbf1897 100644 --- a/src/controller/player.py +++ b/src/controller/player.py @@ -74,12 +74,10 @@ class audioPlayer(object): self.stream.volume = self.vol/100.0 def play_all(self, list_of_urls): + self.stop() self.queue = list_of_urls self.play(self.queue[0]) self.queue.remove(self.queue[0]) - if hasattr(self, "worker") and self.worker != None: - self.worker.cancel() - self.worker = None self.worker = RepeatingTimer(5, self.player_function) self.worker.start()