Skip to content

Commit

Permalink
Refuse to render chunks that are already rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Dec 22, 2023
1 parent 2b3e738 commit aa3bf62
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion markut.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,17 @@ func millisToSecsForFFmpeg(millis Millis) string {
}

func ffmpegCutChunk(context EvalContext, chunk Chunk, y bool) error {
err := os.MkdirAll(ChunksFolder, 0755)
_, err := os.Stat(chunk.Name())
if err == nil {
fmt.Printf("INFO: %s is already rendered\n", chunk.Name());
return nil;
}

if !errors.Is(err, os.ErrNotExist) {
return err
}

err = os.MkdirAll(ChunksFolder, 0755)
if err != nil {
return err
}
Expand Down

0 comments on commit aa3bf62

Please sign in to comment.