mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
#33: Implement setting for use_modern_audio_algo but not it does nothing right now.
This commit is contained in:
parent
92cd16bec9
commit
1b2b5913d1
@ -14,7 +14,7 @@ announce_stream_status = boolean(default=True)
|
||||
retweet_mode = string(default="ask")
|
||||
persist_size = integer(default=1764)
|
||||
buffer_order = list(default=list('home','mentions','dm','sent_dm','sent_tweets','favorites','followers','friends','blocks','muted','events'))
|
||||
autohandle_audio = boolean(default=True)
|
||||
use_modern_audio_algo = boolean(default=True)
|
||||
|
||||
[sound]
|
||||
volume = float(default=1.0)
|
||||
|
@ -91,7 +91,7 @@ class accountSettingsController(globalSettingsController):
|
||||
else:
|
||||
self.dialog.set_value("general", "retweet_mode", _(u"Retweet with comments"))
|
||||
self.dialog.set_value("general", "persist_size", str(self.config["general"]["persist_size"]))
|
||||
self.dialog.set_value("general", "autohandle_audio", self.config["general"]["autohandle_audio"])
|
||||
self.dialog.set_value("general", "use_modern_audio_algo", self.config["general"]["use_modern_audio_algo"])
|
||||
self.dialog.create_other_buffers()
|
||||
buffer_values = self.get_buffers_list()
|
||||
self.dialog.buffers.insert_buffers(buffer_values)
|
||||
@ -151,8 +151,8 @@ class accountSettingsController(globalSettingsController):
|
||||
self.config["general"]["retweet_mode"] = "direct"
|
||||
else:
|
||||
self.config["general"]["retweet_mode"] = "comment"
|
||||
if self.config["general"]["autohandle_audio"] != self.dialog.get_value("general", "autohandle_audio"):
|
||||
self.config["general"]["autohandle_audio"] = self.dialog.get_value("general", "autohandle_audio")
|
||||
if self.config["general"]["use_modern_audio_algo"] != self.dialog.get_value("general", "use_modern_audio_algo"):
|
||||
self.config["general"]["use_modern_audio_algo"] = self.dialog.get_value("general", "use_modern_audio_algo")
|
||||
buffers_list = self.dialog.buffers.get_list()
|
||||
if set(self.config["general"]["buffer_order"]) != set(buffers_list):
|
||||
self.needs_restart = True
|
||||
|
@ -50,6 +50,7 @@ def is_audio(tweet):
|
||||
if i["text"] == "audio":
|
||||
tweet['is_audio']=True
|
||||
return True
|
||||
#implement conditional.
|
||||
for u in find_urls(tweet):
|
||||
if url_is_audio(u):
|
||||
tweet['is_audio']=True
|
||||
|
@ -94,10 +94,10 @@ class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
|
||||
sizer.Add(rMode, 0, wx.ALL, 5)
|
||||
PersistSizeLabel = wx.StaticText(self, -1, _(u"Number of items per buffer to cache in database (0 to disable caching, blank for unlimited)"))
|
||||
self.persist_size = wx.TextCtrl(self, -1)
|
||||
self.autohandle_audio= wx.CheckBox(self, -1, _(U"Automatically handle audio on "+config.app["keymap"]["url"]))
|
||||
self.use_modern_audio_algo= wx.CheckBox(self, -1, _(U"Use audio tweet detection algorithm by Codeofdusk"))
|
||||
sizer.Add(PersistSizeLabel, 0, wx.ALL, 5)
|
||||
sizer.Add(self.persist_size, 0, wx.ALL, 5)
|
||||
sizer.Add(self.autohandle_audio, 0, wx.ALL, 5)
|
||||
sizer.Add(self.use_modern_audio_algo, 0, wx.ALL, 5)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
class other_buffers(wx.Panel):
|
||||
|
Loading…
Reference in New Issue
Block a user