From 29034f42f31f4ae696113ec4c7a5fcedc5e7fbf2 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 14 Sep 2022 10:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=95=BF=E5=BA=A6=E4=B8=8D=E8=B6=B3=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BF=87=E5=88=87=E5=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- danmaku_workflow.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/danmaku_workflow.py b/danmaku_workflow.py index 694956a..783ab7a 100644 --- a/danmaku_workflow.py +++ b/danmaku_workflow.py @@ -341,6 +341,9 @@ class WorkerThread(QThread): create_dt = datetime.strptime(_create_dt, "%Y%m%d_%H%M") duration = self.get_video_real_duration(file) current_sec = 0 + if duration < VIDEO_CLIP_EACH_SEC: + print("[-]Less than each sec, skip") + return while current_sec < duration: if (current_sec + VIDEO_CLIP_OVERFLOW_SEC * 2) > duration: print("[-]Less than 2 overflow sec, skip") @@ -385,18 +388,6 @@ class WorkerThread(QThread): return out_time -class NvencWorkerThread(QThread): - ... - - -class IntelWorkerThread(QThread): - ... - - -class SplitWorkerThread(QThread): - ... - - def duration_str_to_float(duration_str) -> float: _duration = datetime.strptime(duration_str, "%H:%M:%S.%f") - datetime(1900, 1, 1) return _duration.total_seconds()