Skip to content

Commit

Permalink
feat(recursive converter): add ids to batch tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
wailorman committed Oct 24, 2020
1 parent e5e057c commit 1c972dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/media/recursive_converter.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package media

import (
"strconv"

"github.com/pkg/errors"
"github.com/wailorman/ffchunker/pkg/files"
)
Expand Down Expand Up @@ -46,11 +48,12 @@ func BuildBatchTaskFromRecursive(task RecursiveConverterTask, infoGetter InfoGet
Tasks: make([]ConverterTask, 0),
}

for _, file := range videoFiles {
for i, file := range videoFiles {
outFile := file.Clone()
outFile.SetDirPath(task.OutPath)

batchTask.Tasks = append(batchTask.Tasks, ConverterTask{
ID: strconv.Itoa(i),
InFile: file,
OutFile: outFile,
VideoCodec: task.VideoCodec,
Expand Down

0 comments on commit 1c972dd

Please sign in to comment.