From 0562515f68df24739601a915138837b050f7b168 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 15 Jan 2026 15:58:04 +0000 Subject: [PATCH 1/2] extend list --- pandora/archive/cutdetection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/archive/cutdetection.py b/pandora/archive/cutdetection.py index ff3c177d..7ee62167 100644 --- a/pandora/archive/cutdetection.py +++ b/pandora/archive/cutdetection.py @@ -26,7 +26,7 @@ def detect_cuts(path, seconds=True): cuts.append([c + position for c in segment_cuts]) else: fps = AspectRatio(info['video'][0]['framerate']) - cuts.append([c + int(position*fps) for c in segment_cuts]) + cuts += [c + int(position*fps) for c in segment_cuts] position += info['duration'] return cuts From 856d12a90d812c64c5ac51212c8f5e469786a215 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 15 Jan 2026 15:59:14 +0000 Subject: [PATCH 2/2] fix cuts --- pandora/archive/cutdetection.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pandora/archive/cutdetection.py b/pandora/archive/cutdetection.py index 7ee62167..c1ff33c0 100644 --- a/pandora/archive/cutdetection.py +++ b/pandora/archive/cutdetection.py @@ -22,11 +22,16 @@ def detect_cuts(path, seconds=True): for segment in path: info = ox.avinfo(segment) segment_cuts = detect_cuts(segment, seconds) - if seconds: - cuts.append([c + position for c in segment_cuts]) - else: - fps = AspectRatio(info['video'][0]['framerate']) - cuts += [c + int(position*fps) for c in segment_cuts] + if segment_cuts: + if seconds: + if cuts: + cuts.append(position) + cuts += [c + position for c in segment_cuts] + else: + if cuts: + cuts.append(int(position*fps)) + fps = AspectRatio(info['video'][0]['framerate']) + cuts += [c + int(position*fps) for c in segment_cuts] position += info['duration'] return cuts