美化控制台输出:时间戳、颜色标签、线程安全优化

- PlainTextEdit 替换为 TextEdit 支持 HTML 富文本
- 每条日志添加 [HH:MM:SS] 时间戳
- 根据消息类型自动着色(错误红/成功绿/警告橙/信息蓝)
- 修复字幕检测模型无 ONNX providers 时输出空括号的问题
- HTML 特殊字符转义防止注入
- 清理 gui.py closeEvent 中多余的注释代码

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
flavioy
2026-04-07 23:29:16 +08:00
parent 6c61ddc6b0
commit 1ab2eb96cf
3 changed files with 90 additions and 58 deletions

View File

@@ -410,7 +410,9 @@ class SubtitleRemover:
if self.hardware_accelerator.has_cuda() or self.hardware_accelerator.has_mps():
model_device = accelerator_name
self.append_output(tr['Main']['SubtitleRemoverModel'].format(f"{model_friendly_name} ({model_device})"))
self.append_output(tr['Main']['SubtitleDetectionModel'].format(f"{config.subtitleDetectMode.value.value} ({", ".join(self.hardware_accelerator.onnx_providers)})"))
providers = ", ".join(self.hardware_accelerator.onnx_providers)
providers_str = f" ({providers})" if providers else ""
self.append_output(tr['Main']['SubtitleDetectionModel'].format(f"{config.subtitleDetectMode.value.value}{providers_str}"))
def merge_audio_to_video(self):
# 创建音频临时对象windows下delete=True会有permission denied的报错