From 48ffdbeff613d97b52a8524bbd669ef2afca25da Mon Sep 17 00:00:00 2001 From: "Zhangzhichao@123" Date: Thu, 7 Aug 2025 10:29:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=98=AF=E5=90=A6=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=88=90=E5=8A=9F=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helper.py | 7 +++++++ liveMan.py | 1 + 2 files changed, 8 insertions(+) diff --git a/helper.py b/helper.py index d575155..672d61f 100644 --- a/helper.py +++ b/helper.py @@ -113,8 +113,15 @@ class LiveChatConfig: rows = cursor.fetchall() for word, substitutes in rows: results[word] = substitutes + cursor.close() return results + def update_chat_enable_status(self): + cursor = self.conn.cursor() + cursor.execute("update live_config set value = 1 where key = 'chat_enable_status'") + self.conn.commit() + cursor.close() + class PromptQueue: def __init__(self, maxsize=0): diff --git a/liveMan.py b/liveMan.py index 2a6c6a1..875d722 100644 --- a/liveMan.py +++ b/liveMan.py @@ -381,6 +381,7 @@ class DouyinLiveWebReply: """ 优先从用户交互队列中取提示词,如果没有用户交互的数据,则输出系统提示词 """ + live_chat_config.update_chat_enable_status() while True: try: is_speaking = requests.post(f'{live_talking_host}/is_speaking', json={'sessionid': self.session_id},