From cf0f56d3930636ce95d7b08e829e57f6093f39f6 Mon Sep 17 00:00:00 2001 From: testname Date: Tue, 6 Oct 2026 11:53:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=85=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=B8=8D=E5=BD=95=E5=88=B6=E6=97=B6=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E5=BD=95=E5=88=B6=E6=97=A0=E6=95=88=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ui/components/business/recording_card.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/ui/components/business/recording_card.py b/app/ui/components/business/recording_card.py index 658b79b8..5fb7634a 100644 --- a/app/ui/components/business/recording_card.py +++ b/app/ui/components/business/recording_card.py @@ -320,18 +320,25 @@ async def on_toggle_recording(self, recording: Recording): await self.app.snack_bar.show_snack_bar(self._["stop_record_tip"]) else: if recording.monitor_status: + # 修复:手动开始录制时,临时关闭"仅通知不录制",确保真正启动录制 + original_only_notify = recording.only_notify_no_record + recording.only_notify_no_record = False await self.app.record_manager.check_if_live(recording) - if recording.is_live: - self.app.record_manager.start_update(recording) + # 恢复原始设置 + recording.only_notify_no_record = original_only_notify + if recording.is_live and recording.is_recording: await self.app.snack_bar.show_snack_bar(self._["pre_record_tip"], bgcolor=ft.Colors.PRIMARY) + elif recording.is_live: + # 检测到直播但录制未启动成功 + await self.app.snack_bar.show_snack_bar(self._["is_not_live_tip"]) else: await self.app.snack_bar.show_snack_bar(self._["is_not_live_tip"]) else: await self.app.snack_bar.show_snack_bar(self._["please_start_monitor_tip"]) - await self.update_card(recording) self.app.page.pubsub.send_others_on_topic("update", recording) + async def on_delete_recording(self, recording: Recording): """Delete a recording from the list and update UI.""" if recording: