mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Set prepared=False after playing and stopping an audio in URLStream class
This commit is contained in:
parent
11703f50fe
commit
851f711357
@ -109,7 +109,6 @@ class URLStream(object):
|
||||
transformer = audio_services.find_url_transformer(self.url)
|
||||
self.url = transformer(self.url)
|
||||
log.debug("Transformed URL: %s. Prepared" % (self.url,))
|
||||
self.prepared = True
|
||||
else:
|
||||
self.url = url
|
||||
log.debug("Transformed URL: %s. Prepared" % (self.url,))
|
||||
@ -144,6 +143,7 @@ class URLStream(object):
|
||||
self.stream.volume = float(volume)
|
||||
self.stream.play()
|
||||
log.debug("played")
|
||||
self.prepared=False
|
||||
|
||||
def stop_audio(self,delete=False):
|
||||
if hasattr(self, "stream"):
|
||||
@ -156,6 +156,7 @@ class URLStream(object):
|
||||
if delete:
|
||||
del self.stream
|
||||
log.debug("Deleted audio stream.")
|
||||
self.prepared=False
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user