mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Cleanup, disabled accurate audio algo by default, string cleanup.
This commit is contained in:
parent
9ddc74d640
commit
e92565013b
@ -12,6 +12,7 @@ use_invisible_keyboard_shorcuts = boolean(default=True)
|
||||
play_ready_sound = boolean(default=True)
|
||||
speak_ready_msg = boolean(default=True)
|
||||
log_level = string(default="error")
|
||||
use_slow_audio_algo = boolean(default=False)
|
||||
|
||||
[keymap]
|
||||
up = string(default="control+win+up")
|
||||
|
@ -452,6 +452,7 @@ class baseBufferController(bufferController):
|
||||
return sound.URLPlayer.stop_audio()
|
||||
output.speak("Opening media...",True)
|
||||
if sound.URLPlayer.is_playable(url=url,play=True) == False:
|
||||
print "Opening",url,"in browser..."
|
||||
return self.url(url,announce=False)
|
||||
elif utils.is_geocoded(tweet):
|
||||
return output.speak("Not implemented",True)
|
||||
|
@ -40,7 +40,7 @@ class globalSettingsController(object):
|
||||
self.dialog.set_value("general", "use_invisible_shorcuts", config.app["app-settings"]["use_invisible_keyboard_shorcuts"])
|
||||
self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"])
|
||||
self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"])
|
||||
self.dialog.set_value("general", "use_modern_audio_algo", config.app["app-settings"]["use_modern_audio_algo"])
|
||||
self.dialog.set_value("general", "use_slow_audio_algo", config.app["app-settings"]["use_slow_audio_algo"])
|
||||
self.dialog.create_proxy()
|
||||
self.dialog.set_value("proxy", "server", config.app["proxy"]["server"])
|
||||
self.dialog.set_value("proxy", "port", config.app["proxy"]["port"])
|
||||
@ -62,8 +62,8 @@ class globalSettingsController(object):
|
||||
config.app["app-settings"]["ask_at_exit"] = self.dialog.get_value("general", "ask_at_exit")
|
||||
config.app["app-settings"]["play_ready_sound"] = self.dialog.get_value("general", "play_ready_sound")
|
||||
config.app["app-settings"]["speak_ready_msg"] = self.dialog.get_value("general", "speak_ready_msg")
|
||||
if config.app["app-settings"]["use_modern_audio_algo"] != self.dialog.get_value("general", "use_modern_audio_algo"):
|
||||
config.app["app-settings"]["use_modern_audio_algo"] = self.dialog.get_value("general", "use_modern_audio_algo")
|
||||
if config.app["app-settings"]["use_slow_audio_algo"] != self.dialog.get_value("general", "use_modern_audio_algo"):
|
||||
config.app["app-settings"]["use_slow_audio_algo"] = self.dialog.get_value("general", "use_slow_audio_algo")
|
||||
#Todo: clean memmos.
|
||||
if config.app["proxy"]["server"] != self.dialog.get_value("proxy", "server") or config.app["proxy"]["port"] != self.dialog.get_value("proxy", "port") or config.app["proxy"]["user"] != self.dialog.get_value("proxy", "user") or config.app["proxy"]["password"] != self.dialog.get_value("proxy", "password"):
|
||||
if self.is_started == True:
|
||||
|
@ -145,7 +145,7 @@ class URLStream(object):
|
||||
return self.play(stream=stream,volume=volume,announce=False)
|
||||
return True
|
||||
except:
|
||||
log.exception("Exception.")
|
||||
print "Exception."
|
||||
return False
|
||||
def stop_audio(self):
|
||||
if hasattr(self, "stream") and self.stream.is_playing == True:
|
||||
|
@ -60,7 +60,7 @@ def is_audio(tweet,force=False):
|
||||
except:
|
||||
log.exception("Exception while executing is_audio hashtag algorithm")
|
||||
try:
|
||||
if config.app["app-settings"]["use_modern_audio_algo"]:
|
||||
if config.app["app-settings"]["use_slow_audio_algo"]:
|
||||
for u in find_urls(tweet):
|
||||
if url_is_audio(u):
|
||||
tweet['is_audio']=True
|
||||
|
@ -30,8 +30,8 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
|
||||
self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch"))
|
||||
sizer.Add(self.hide_gui, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
self.use_modern_audio_algo= wx.CheckBox(self, -1, _(U"Use audio tweet detection algorithm by Codeofdusk"))
|
||||
sizer.Add(self.use_modern_audio_algo, 0, wx.ALL, 5)
|
||||
self.use_slow_audio_algo= wx.CheckBox(self, -1, _(U"Use slow audio tweet detection algorithm (improves audio tweet detection accuracy at the cost of performance))"))
|
||||
sizer.Add(self.use_slow_audio_algo, 0, wx.ALL, 5)
|
||||
|
||||
class proxy(wx.Panel, baseDialog.BaseWXDialog):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user