From 50a78f6a2a05f8eeef6f544abf758efd8346cd64 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Thu, 11 Dec 2025 09:16:39 -0500 Subject: [PATCH] Fix merge job clip extraction --- main.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 41fd116..1940634 100644 --- a/main.go +++ b/main.go @@ -1923,9 +1923,20 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress outputPath, _ := cfg["outputPath"].(string) rawClips, _ := cfg["clips"].([]interface{}) + rawClipMaps, _ := cfg["clips"].([]map[string]interface{}) var clips []mergeClip - for _, rc := range rawClips { - if m, ok := rc.(map[string]interface{}); ok { + if len(rawClips) > 0 { + for _, rc := range rawClips { + if m, ok := rc.(map[string]interface{}); ok { + clips = append(clips, mergeClip{ + Path: toString(m["path"]), + Chapter: toString(m["chapter"]), + Duration: toFloat(m["duration"]), + }) + } + } + } else if len(rawClipMaps) > 0 { + for _, m := range rawClipMaps { clips = append(clips, mergeClip{ Path: toString(m["path"]), Chapter: toString(m["chapter"]),