info args
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user