mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Honor session volume during audio playback from interact method.
This commit is contained in:
parent
1b4ebebf25
commit
81a9a36519
@ -44,6 +44,7 @@ class bufferController(object):
|
|||||||
|
|
||||||
def clear_list(self): pass
|
def clear_list(self): pass
|
||||||
|
|
||||||
|
|
||||||
def get_event(self, ev):
|
def get_event(self, ev):
|
||||||
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "audio"
|
if ev.GetKeyCode() == wx.WXK_RETURN and ev.ControlDown(): event = "audio"
|
||||||
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "interact"
|
elif ev.GetKeyCode() == wx.WXK_RETURN: event = "interact"
|
||||||
@ -432,7 +433,7 @@ class baseBufferController(bufferController):
|
|||||||
try:
|
try:
|
||||||
sound.URLPlayer.play(url, self.session.settings["sound"]["volume"])
|
sound.URLPlayer.play(url, self.session.settings["sound"]["volume"])
|
||||||
except:
|
except:
|
||||||
self.url(url=url)
|
log("Exception while executing audio method.")
|
||||||
@_tweets_exist
|
@_tweets_exist
|
||||||
def interact(self):
|
def interact(self):
|
||||||
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
|
"Select the best action for the currently focused tweet (audio, geocode, URL, etc)."
|
||||||
@ -451,7 +452,7 @@ class baseBufferController(bufferController):
|
|||||||
if hasattr(sound.URLPlayer,'stream'):
|
if hasattr(sound.URLPlayer,'stream'):
|
||||||
return sound.URLPlayer.stop_audio(delete=True)
|
return sound.URLPlayer.stop_audio(delete=True)
|
||||||
output.speak("Opening media...",True)
|
output.speak("Opening media...",True)
|
||||||
if sound.URLPlayer.is_playable(url=url,play=True) == False:
|
if sound.URLPlayer.is_playable(url=url,play=True,volume=self.session.settings["sound"]["volume"]) == False:
|
||||||
print "Opening",url,"in browser..."
|
print "Opening",url,"in browser..."
|
||||||
return self.url(url,announce=False)
|
return self.url(url,announce=False)
|
||||||
elif utils.is_geocoded(tweet):
|
elif utils.is_geocoded(tweet):
|
||||||
|
Loading…
Reference in New Issue
Block a user