Fix merge job clip extraction
This commit is contained in:
parent
84721eb822
commit
50a78f6a2a
15
main.go
15
main.go
|
|
@ -1923,9 +1923,20 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress
|
||||||
outputPath, _ := cfg["outputPath"].(string)
|
outputPath, _ := cfg["outputPath"].(string)
|
||||||
|
|
||||||
rawClips, _ := cfg["clips"].([]interface{})
|
rawClips, _ := cfg["clips"].([]interface{})
|
||||||
|
rawClipMaps, _ := cfg["clips"].([]map[string]interface{})
|
||||||
var clips []mergeClip
|
var clips []mergeClip
|
||||||
for _, rc := range rawClips {
|
if len(rawClips) > 0 {
|
||||||
if m, ok := rc.(map[string]interface{}); ok {
|
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{
|
clips = append(clips, mergeClip{
|
||||||
Path: toString(m["path"]),
|
Path: toString(m["path"]),
|
||||||
Chapter: toString(m["chapter"]),
|
Chapter: toString(m["chapter"]),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user