Add comprehensive tests for ytdlp parameter parsing

Co-authored-by: krau <71133316+krau@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-19 04:28:11 +00:00
co-authored by krau
parent 9ee9972dec
commit 1b9c8cd2ad
17 changed files with 274 additions and 32 deletions
+2 -2
View File
@@ -27,13 +27,13 @@ func handleYtdlpCmd(ctx *ext.Context, update *ext.Update) error {
// Separate URLs and flags from arguments
var urls []string
var flags []string
for i := 1; i < len(args); i++ {
arg := strings.TrimSpace(args[i])
if arg == "" {
continue
}
// Check if it's a flag (starts with - or --)
if strings.HasPrefix(arg, "-") {
flags = append(flags, arg)