Only use -f arg if filter is given

If filter is not given then we let youtube-dl/yt-dlp decide the format to download.
This commit is contained in:
Nonoo
2023-08-14 13:47:06 +02:00
parent 2d7d4563d9
commit 3c1f4ce6da

View File

@ -462,7 +462,7 @@ func (result Result) Download(ctx context.Context, filter string) (*DownloadResu
) )
// don't need to specify if direct as there is only one // don't need to specify if direct as there is only one
// also seems to be issues when using filter with generic extractor // also seems to be issues when using filter with generic extractor
if !result.Info.Direct { if !result.Info.Direct && filter != "" {
cmd.Args = append(cmd.Args, "-f", filter) cmd.Args = append(cmd.Args, "-f", filter)
} }