info args
Some checks failed
Build on push and PRs / build (push) Failing after 5s
Automatic version updates / version_update (push) Failing after 6s

This commit is contained in:
2025-01-22 22:51:12 +03:00
parent 1a1941ca29
commit 24cc3575e4

View File

@ -236,6 +236,8 @@ type Options struct {
MergeOutputFormat string // --merge-output-format MergeOutputFormat string // --merge-output-format
SortingFormat string // --format-sort SortingFormat string // --format-sort
ExtractorArgs string // --extractor-args ExtractorArgs string // --extractor-args
InfoArgs []string
DownloadArgs []string
// Set to true if you don't want to use the result.Info structure after the goutubedl.New() call, // 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. // so the given URL will be downloaded in a single pass in the DownloadResult.Download() call.
@ -352,6 +354,8 @@ func infoFromURL(
) )
} }
cmd.Args = append(cmd.Args, options.InfoArgs...)
switch options.Type { switch options.Type {
case TypePlaylist, TypeChannel: case TypePlaylist, TypeChannel:
cmd.Args = append(cmd.Args, "--yes-playlist") cmd.Args = append(cmd.Args, "--yes-playlist")
@ -685,6 +689,8 @@ func (result Result) DownloadWithOptions(
) )
} }
cmd.Args = append(cmd.Args, result.Options.DownloadArgs...)
cmd.Dir = tempPath cmd.Dir = tempPath
var stdoutW io.WriteCloser var stdoutW io.WriteCloser
var stderrW io.WriteCloser var stderrW io.WriteCloser