From 3974438d781c7fb71eff708f96f01604098e567c Mon Sep 17 00:00:00 2001 From: shuaikangzhou <863909694@qq.com> Date: Wed, 27 Dec 2023 21:31:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=AD=E9=9F=B3=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/DataBase/output_pc.py | 3 +-- app/web_ui/web.py | 9 +-------- readme.md | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app/DataBase/output_pc.py b/app/DataBase/output_pc.py index 1735647..2dc35a1 100644 --- a/app/DataBase/output_pc.py +++ b/app/DataBase/output_pc.py @@ -315,12 +315,11 @@ class ChildThread(QThread): try: audio_path = media_msg_db.get_audio_path(msgSvrId, output_path=origin_docx_path + "/voice") audio_path = audio_path.replace('/', '\\') - modify_audio_metadata(audio_path, displayname) - os.utime(audio_path, (timestamp, timestamp)) audio_path = audio_path.replace('\\', '/') audio_path = "./voice/" + os.path.basename(audio_path) voice_to_text = escape_js_and_html(media_msg_db.get_audio_text(str_content)) except: + logger.error(traceback.format_exc()) return doc.write( f'''{{ type:34, text:'{audio_path}',is_send:{is_send},avatar_path:'{avatar}',voice_to_text:'{voice_to_text}',timestamp:{timestamp},is_chatroom:{is_chatroom},displayname:'{displayname}'}},''' diff --git a/app/web_ui/web.py b/app/web_ui/web.py index 0fc29b0..8a9ce76 100644 --- a/app/web_ui/web.py +++ b/app/web_ui/web.py @@ -17,7 +17,7 @@ contact: ContactPC = None @app.route("/") def index(): # 渲染模板,并传递图表的 HTML 到模板中 - return render_template("index.html") + return "index.html" @app.route("/christmas") @@ -87,13 +87,6 @@ def christmas(): return render_template("christmas.html", **data, **wordcloud_cloud_data, **time_data, **month_data, **calendar_data, **emoji_data) - -# @app.route("/") -# def cindex(): -# # 渲染模板,并传递图表的 HTML 到模板中 -# return render_template("cindex.html") - - @app.route('/home') def home(): try: diff --git a/readme.md b/readme.md index 25504fa..77925f9 100644 --- a/readme.md +++ b/readme.md @@ -158,7 +158,7 @@ python main.py 显示效果 -聊天界面 +聊天界面 ### 4. pc端功能展示