remove temporary files.txt after ffmpeg run

This commit is contained in:
ari melody 2026-01-30 14:27:44 +00:00
parent 45db651388
commit 4752e4bf4c
Signed by: ari
GPG key ID: CF99829C92678188

View file

@ -3,6 +3,7 @@ package video
import (
"encoding/json"
"fmt"
"log"
"os"
"path"
"strconv"
@ -64,6 +65,11 @@ func ConcatVideo(video *youtube.Video, vodFiles []string, verbose bool) (int64,
return 0, fmt.Errorf("ffmpeg error: %v", err)
}
if err = os.Remove(fileListPath); err != nil {
log.Fatalf("Failed to remove temporary file list: %v", err)
// not the end of the world; move along
}
fileInfo, err := os.Stat(video.Filename)
if err != nil { return 0, fmt.Errorf("failed to read output file: %v", err) }