mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-05-17 14:27:38 +08:00
Improve flag parsing logic and clarify argument order
Co-authored-by: krau <71133316+krau@users.noreply.github.com>
This commit is contained in:
@@ -99,8 +99,8 @@ func (t *Task) downloadFiles(ctx context.Context, tempDir string) ([]string, err
|
||||
// Execute download with URLs and custom flags
|
||||
logger.Infof("Executing yt-dlp for %d URL(s) with %d custom flag(s)", len(t.URLs), len(t.Flags))
|
||||
|
||||
// Combine URLs and flags as arguments
|
||||
// The Run method will pass flags as raw command-line arguments
|
||||
// Combine flags and URLs as arguments (flags first, then URLs)
|
||||
// yt-dlp accepts: yt-dlp [OPTIONS] URL [URL...]
|
||||
args := append(t.Flags, t.URLs...)
|
||||
|
||||
// Run with context for cancellation support
|
||||
|
||||
Reference in New Issue
Block a user