feat: 唤醒口令配置支持配语音词,简化自定义口令配置 see #105
This commit is contained in:
parent
0ddbe58fbd
commit
901506a32d
@ -712,10 +712,17 @@ class XiaoMusic:
|
|||||||
if opkey in KEY_WORD_ARG_BEFORE_DICT:
|
if opkey in KEY_WORD_ARG_BEFORE_DICT:
|
||||||
oparg = argpre
|
oparg = argpre
|
||||||
opvalue = self.config.key_word_dict.get(opkey)
|
opvalue = self.config.key_word_dict.get(opkey)
|
||||||
if not ctrl_panel and not self.isplaying():
|
|
||||||
if self.active_cmd and opvalue not in self.active_cmd:
|
if (
|
||||||
self.log.info(f"不在激活命令中 {opvalue}")
|
(not ctrl_panel)
|
||||||
continue
|
and (not self.isplaying())
|
||||||
|
and self.active_cmd
|
||||||
|
and (opvalue not in self.active_cmd)
|
||||||
|
and (opkey not in self.active_cmd)
|
||||||
|
):
|
||||||
|
self.log.info(f"不在激活命令中 {opvalue}")
|
||||||
|
continue
|
||||||
|
|
||||||
self.log.info(f"匹配到指令. opkey:{opkey} opvalue:{opvalue} oparg:{oparg}")
|
self.log.info(f"匹配到指令. opkey:{opkey} opvalue:{opvalue} oparg:{oparg}")
|
||||||
return (opvalue, oparg)
|
return (opvalue, oparg)
|
||||||
self.log.info(f"未匹配到指令 {query} {ctrl_panel}")
|
self.log.info(f"未匹配到指令 {query} {ctrl_panel}")
|
||||||
|
Loading…
Reference in New Issue
Block a user