More code changes. This is a big mess right now. Will clean this up.

This commit is contained in:
Bill Dengler 2015-05-13 13:36:28 -04:00
parent 74f0e8ba50
commit 2a8868f096
3 changed files with 2 additions and 2 deletions

View File

@ -448,6 +448,7 @@ class baseBufferController(bufferController):
url=urls_list.get_string() url=urls_list.get_string()
if hasattr(urls_list, "destroy"): urls_list.destroy() if hasattr(urls_list, "destroy"): urls_list.destroy()
if url != None: if url != None:
sound.URLPlayer.stop_audio()
if sound.URLPlayer.is_playable(url=url,play=True) == False: if sound.URLPlayer.is_playable(url=url,play=True) == False:
return self.url(url) return self.url(url)
elif utils.is_geocoded(tweet): elif utils.is_geocoded(tweet):

View File

@ -155,6 +155,7 @@ class URLStream(object):
return False return False
def stop_audio(self): def stop_audio(self):
if hasattr(self, "stream") and self.stream.is_playing == True: if hasattr(self, "stream") and self.stream.is_playing == True:
output.speak("Stopped.",True)
self.stream.stop() self.stream.stop()
@staticmethod @staticmethod

View File

@ -45,7 +45,6 @@ def find_next_reply(id, listItem):
return None return None
def is_audio(tweet,force=False): def is_audio(tweet,force=False):
<<<<<<< HEAD
start=time.time() start=time.time()
if force == False and 'is_audio' in tweet: if force == False and 'is_audio' in tweet:
return tweet['is_audio'] return tweet['is_audio']
@ -143,7 +142,6 @@ def is_allowed(tweet, clients):
allowed = False allowed = False
log.exception("Tuit not allowed: %s" % (tweet["text"],)) log.exception("Tuit not allowed: %s" % (tweet["text"],))
return allowed return allowed
<<<<<<< HEAD
def url_is_audio(u): def url_is_audio(u):
sound.URLPlayer.is_playable(u) sound.URLPlayer.is_playable(u)