This commit is contained in:
smirgol 2023-06-27 16:41:44 +02:00 committed by GitHub
commit 53433c984f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 7 deletions

View File

@ -59,12 +59,10 @@ class ProfileExecutor(threading.Thread):
#print ("writing command list")
w_commandWordFile = open(self.getSettingsPath('command.list'), 'w')
w_commands = self.m_profile['commands']
i = 0
for w_command in w_commands:
if i != 0:
w_commandWordFile.write('\n')
w_commandWordFile.write(w_command['name'].lower() + ' /1e-%d/' % w_command['threshold'])
i = i + 1
parts = w_command['name'].split(',')
for part in parts:
w_commandWordFile.write(part.lower() + ' /1e-%d/' % w_command['threshold'] + '\n')
w_commandWordFile.close()
self.m_config.set_string('-kws', self.getSettingsPath('command.list'))
# load new command list into decoder and restart it
@ -213,9 +211,14 @@ class ProfileExecutor(threading.Thread):
w_commands = self.m_profile['commands']
flag = False
for w_command in w_commands:
if w_command['name'].lower() == p_cmdName:
flag = True
parts = w_command['name'].split(',')
for part in parts:
if part.lower() == p_cmdName:
flag = True
break
if flag == True:
break
if flag == False:
return