From 72468624d6e065e03b994da19daa6921a9dd6437 Mon Sep 17 00:00:00 2001 From: shuaikangzhou <863909694@qq.com> Date: Sun, 7 Jan 2024 22:25:21 +0800 Subject: [PATCH] =?UTF-8?q?ffmpeg=E5=91=BD=E4=BB=A4=E5=8A=A0=E5=BC=95?= =?UTF-8?q?=E5=8F=B7=EF=BC=8C=E5=BD=BB=E5=BA=95=E8=A7=A3=E5=86=B3=E8=AF=AD?= =?UTF-8?q?=E9=9F=B3=E8=B7=AF=E5=BE=84=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/1_bug_report.yml | 1 + .github/ISSUE_TEMPLATE/2_feature_request.yml | 2 ++ app/DataBase/media_msg.py | 6 +++--- app/components/bubble_message.py | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yml b/.github/ISSUE_TEMPLATE/1_bug_report.yml index bb56fb3..37389d8 100644 --- a/.github/ISSUE_TEMPLATE/1_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yml @@ -40,6 +40,7 @@ body: attributes: label: '🐛 问题描述 | Bug Description' description: A clear and concise description of the bug. + value: '报错截图:' validations: required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/2_feature_request.yml b/.github/ISSUE_TEMPLATE/2_feature_request.yml index 2aadeac..97184b6 100644 --- a/.github/ISSUE_TEMPLATE/2_feature_request.yml +++ b/.github/ISSUE_TEMPLATE/2_feature_request.yml @@ -9,6 +9,8 @@ body: options: - 是 - 否 + validations: + required: true - type: textarea attributes: label: '🥰 需求描述 | Feature Description' diff --git a/app/DataBase/media_msg.py b/app/DataBase/media_msg.py index 8d0bc83..5aba597 100644 --- a/app/DataBase/media_msg.py +++ b/app/DataBase/media_msg.py @@ -84,20 +84,20 @@ class MediaMsg: ffmpeg_path = get_ffmpeg_path() # # 调用 FFmpeg if os.path.exists(ffmpeg_path): - cmd = f'''{ffmpeg_path} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}''' + cmd = f'''"{ffmpeg_path}" -loglevel quiet -y -f s16le -i "{pcm_path}" -ar 44100 -ac 1 "{mp3_path}"''' # system(cmd) # 使用subprocess.run()执行命令 subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) else: # 源码运行的时候下面的有效 # 这里不知道怎么捕捉异常 - cmd = f'''{os.path.join(os.getcwd(), 'app', 'resources', 'data','ffmpeg.exe')} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}''' + cmd = f'''"{os.path.join(os.getcwd(), 'app', 'resources', 'data','ffmpeg.exe')}" -loglevel quiet -y -f s16le -i "{pcm_path}" -ar 44100 -ac 1 "{mp3_path}"''' # system(cmd) # 使用subprocess.run()执行命令 subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except Exception as e: print(f"Error: {e}") - cmd = f'''{os.path.join(os.getcwd(), 'app', 'resources', 'data', 'ffmpeg.exe')} -loglevel quiet -y -f s16le -i {pcm_path} -ar 44100 -ac 1 {mp3_path}''' + cmd = f'''"{os.path.join(os.getcwd(), 'app', 'resources', 'data', 'ffmpeg.exe')}" -loglevel quiet -y -f s16le -i "{pcm_path}" -ar 44100 -ac 1 "{mp3_path}"''' # system(cmd) # 使用subprocess.run()执行命令 subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) diff --git a/app/components/bubble_message.py b/app/components/bubble_message.py index 66d0e08..18ed56c 100644 --- a/app/components/bubble_message.py +++ b/app/components/bubble_message.py @@ -147,6 +147,7 @@ class ImageMessage(QLabel): # self.setFixedSize(self.max_width,self.max_height) self.setMaximumWidth(self.max_width) self.setMaximumHeight(self.max_height) + self.setCursor(Qt.PointingHandCursor) if isinstance(image, str): pixmap = QPixmap(image) self.image_path = image