Improve flag parsing logic and clarify argument order

Co-authored-by: krau <71133316+krau@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-19 04:31:33 +00:00
parent 1b9c8cd2ad
commit 154ea47e6b
3 changed files with 21 additions and 14 deletions

View File

@@ -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