From e2d71266c5d267321ccc23e42b904192962d6329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Sun, 29 Sep 2024 10:22:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=8F=A3=E4=BB=A4=E6=9C=AB=E5=B0=BE=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E9=80=97=E5=8F=B7=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaomusic/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xiaomusic/config.py b/xiaomusic/config.py index 0ae8c8a..ca0cb11 100644 --- a/xiaomusic/config.py +++ b/xiaomusic/config.py @@ -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():