From 787a5fa06bb1eadaac487238ed8c087e5ebe2bcb Mon Sep 17 00:00:00 2001 From: xaoyo Date: Sat, 11 Nov 2023 18:42:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=81=8A=E5=A4=A9=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=A7=A3=E6=9E=90=EF=BC=8C=E6=9F=A5=E7=9C=8B=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pywxdump/show_chat/main_window.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39123ef..3e9257f 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ cd PyWxDump python -m pip install -U . ``` -## 2. 使用方法 +## 2. 使用 ### 2.1 命令行 diff --git a/pywxdump/show_chat/main_window.py b/pywxdump/show_chat/main_window.py index 811a79a..15237e8 100644 --- a/pywxdump/show_chat/main_window.py +++ b/pywxdump/show_chat/main_window.py @@ -51,7 +51,8 @@ def get_user_list(MSG_ALL_db_path, MicroMsg_db_path): def load_base64_audio_data(MsgSvrID, MediaMSG_all_db_path): wave_data = read_audio(MsgSvrID, is_wave=True, DB_PATH=MediaMSG_all_db_path) - + if not wave_data: + return "" video_base64 = base64.b64encode(wave_data).decode("utf-8") video_data = f"data:audio/wav;base64,{video_base64}" return video_data