add extractor args
Some checks failed
Build on push and PRs / build (push) Failing after 14s

This commit is contained in:
2025-01-14 21:06:06 +03:00
parent e8e101773e
commit b534e45a9c

View File

@ -235,6 +235,7 @@ type Options struct {
HTTPClient *http.Client // Client for download thumbnail and subtitles (nil use http.DefaultClient)
MergeOutputFormat string // --merge-output-format
SortingFormat string // --format-sort
ExtractorArgs string // --extractor-args
// Set to true if you don't want to use the result.Info structure after the goutubedl.New() call,
// so the given URL will be downloaded in a single pass in the DownloadResult.Download() call.
@ -672,6 +673,12 @@ func (result Result) DownloadWithOptions(
)
}
if result.Options.ExtractorArgs != "" {
cmd.Args = append(cmd.Args,
"--extractor-args", result.Options.ExtractorArgs,
)
}
cmd.Dir = tempPath
var stdoutW io.WriteCloser
var stderrW io.WriteCloser