Added more logging

This commit is contained in:
Logan G 2024-12-31 17:48:37 -07:00
parent e10528b00c
commit f25d9448c3
Signed by: logan
GPG key ID: E328528C921E7A7A
3 changed files with 7 additions and 2 deletions

View file

@ -2,9 +2,11 @@ package main
import (
ffmpeg "github.com/u2takey/ffmpeg-go"
"github.com/charmbracelet/log"
)
func mergeStreams(path1 string, path2 string, format string, output string) (err error) {
log.Debugf("Merging \"%s\" and \"%s\" to \"%s\" using format \"%s\"", path1, path2, output, format)
input := []*ffmpeg.Stream{ffmpeg.Input(path1), ffmpeg.Input(path2)}
defaultArgs := ffmpeg.KwArgs{"c:v": "copy", "c:a": "copy", "format": format}

View file

@ -4,9 +4,10 @@ import (
"fmt"
"os"
"errors"
"io"
//"github.com/charmbracelet/log"
"github.com/charmbracelet/log"
"github.com/h2non/filetype"
)

View file

@ -126,7 +126,9 @@ func main() {
}
log.Infof("Downloading video: %s", v.Title)
downloadVideo(v.WebpageURL, path, group)
if err := downloadVideo(v.WebpageURL, path, group); err != nil {
log.Error(err)
}
}
}
}