diff --git a/goutubedl.go b/goutubedl.go index 1b85c49..df21d78 100644 --- a/goutubedl.go +++ b/goutubedl.go @@ -236,6 +236,8 @@ type Options struct { MergeOutputFormat string // --merge-output-format SortingFormat string // --format-sort 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, // 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 { case TypePlaylist, TypeChannel: 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 var stdoutW io.WriteCloser var stderrW io.WriteCloser