From eec535092613f2f1aba1bcbd272fed4c63730207 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Mon, 22 Apr 2019 00:10:40 -0500 Subject: [PATCH] Improve checks for audio in stayed state --- src/presenters/player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/presenters/player.py b/src/presenters/player.py index a93cab1..7d6d0fb 100644 --- a/src/presenters/player.py +++ b/src/presenters/player.py @@ -63,7 +63,7 @@ class audioPlayer(object): if "url" in object and object["url"] =="": pub.sendMessage("notify", message=_("This file could not be played because it is not allowed in your country")) return - if self.stream != None and self.stream.is_playing == True: + if self.stream != None and (self.stream.is_playing == True or self.stream.is_stayed == True): try: self.stream.stop() except BassError: @@ -196,7 +196,7 @@ class audioPlayer(object): """ check if the player is already playing a stream. """ if self.stream == None: return False - if self.stream != None and self.stream.is_playing == False: + if self.stream != None and self.stream.is_playing == False and self.stream.is_stayed == False: return False else: return True \ No newline at end of file