Clean out memmos when switching algos.

This commit is contained in:
Bill Dengler 2015-05-12 19:30:44 -04:00
parent 8ce5c258d3
commit ee1f95ea3b
2 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import widgetUtils
import config
import languageHandler
import output
import application
from wxUI.dialogs import configuration
from wxUI import commonMessageDialogs
from extra.autocompletionUsers import settings
@ -153,6 +154,7 @@ class accountSettingsController(globalSettingsController):
self.config["general"]["retweet_mode"] = "comment"
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")
self.buffer.session.clean_is_audio_memmos()
buffers_list = self.dialog.buffers.get_list()
if set(self.config["general"]["buffer_order"]) != set(buffers_list):
self.needs_restart = True

View File

@ -415,4 +415,12 @@ class Session(object):
for key,value in self.db.items():
if type(value) == list:
for t in value:
utils.is_audio(t,force=force)
utils.is_audio(t,force=force)
def clean_is_audio_memmos(self):
"Clean out memmos for is_audio"
for key,value in self.db.items():
if type(value) == list:
for i in value:
if 'is_audio' in i:
del i['is_audio']