From fab9e65113b92677ef6b55e88aec5cf9ecf403d3 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 4 May 2022 12:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E5=B9=95=E5=BC=82=E5=B8=B8=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=B7=B3=E8=BF=87=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/worker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/workflow/worker.py b/workflow/worker.py index dbb265c..34f66be 100644 --- a/workflow/worker.py +++ b/workflow/worker.py @@ -9,7 +9,11 @@ def do_workflow(video_file, danmaku_base_file, *danmaku_files): if not os.path.exists(danmaku_base_file): ... result = [] - start_ts = get_file_start(danmaku_base_file) + try: + start_ts = get_file_start(danmaku_base_file) + except DanmakuException: + print("基准弹幕文件异常,跳过") + return result.append(danmaku_to_subtitle(danmaku_base_file, 0)) for danmaku_file in danmaku_files: try: