diff --git a/src/app-configuration.defaults b/src/app-configuration.defaults index 05a3e780..a1a9c0b7 100644 --- a/src/app-configuration.defaults +++ b/src/app-configuration.defaults @@ -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") diff --git a/src/controller/buffersController.py b/src/controller/buffersController.py index da32ef2d..af82185b 100644 --- a/src/controller/buffersController.py +++ b/src/controller/buffersController.py @@ -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) diff --git a/src/controller/settings.py b/src/controller/settings.py index 31f2484f..112a2a96 100644 --- a/src/controller/settings.py +++ b/src/controller/settings.py @@ -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: diff --git a/src/sound.py b/src/sound.py index b22ce93d..76ce1672 100644 --- a/src/sound.py +++ b/src/sound.py @@ -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: diff --git a/src/twitter/utils.py b/src/twitter/utils.py index 1e8a1aa1..04581600 100644 --- a/src/twitter/utils.py +++ b/src/twitter/utils.py @@ -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 diff --git a/src/wxUI/dialogs/configuration.py b/src/wxUI/dialogs/configuration.py index 847b41e1..df2422a0 100644 --- a/src/wxUI/dialogs/configuration.py +++ b/src/wxUI/dialogs/configuration.py @@ -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):