Skip to content

Commit

Permalink
fix: 修复自定义口令末尾多余逗号的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxi committed Sep 29, 2024
1 parent 86110a2 commit e2d7126
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xiaomusic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ class Config:

def append_keyword(self, keys, action):
for key in keys.split(","):
self.key_word_dict[key] = action
if key not in self.key_match_order:
self.key_match_order.append(key)
if key:
self.key_word_dict[key] = action
if key not in self.key_match_order:
self.key_match_order.append(key)

def append_user_keyword(self):
for k, v in self.user_key_word_dict.items():
Expand Down

0 comments on commit e2d7126

Please sign in to comment.