From 28c66ea3e81f8e32f6391e97113e2e41d281792c Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 17 Apr 2022 15:18:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E5=90=8E=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=97=A0=E7=94=A8=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker/danmaku.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/worker/danmaku.py b/worker/danmaku.py index 218dd95..c7e47cf 100644 --- a/worker/danmaku.py +++ b/worker/danmaku.py @@ -1,4 +1,3 @@ -import argparse import os.path from datetime import datetime @@ -24,4 +23,8 @@ def do_workflow(video_file, danmaku_base_file, *danmaku_files): print(result) encode_video_with_subtitles(video_file, result, new_file_name) quick_split_video(new_file_name) + # clean files + for file in result: + os.remove(file) + os.remove(new_file_name)