CLI: Improve "photoprism dl" to download multiple URLs with auth #5219

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-20 13:14:58 +02:00
parent d447adc59c
commit 5e84da55e5
19 changed files with 1154 additions and 140 deletions

View File

@@ -0,0 +1,28 @@
package commands
import (
"testing"
)
func TestDownloadCommand_HelpFlagsAndArgs(t *testing.T) {
if DownloadCommand.ArgsUsage != "[url]..." {
t.Fatalf("ArgsUsage mismatch: %q", DownloadCommand.ArgsUsage)
}
// Verify new flags are present by name
want := map[string]bool{
"cookies": false,
"add-header": false,
"dl-method": false,
}
for _, f := range DownloadCommand.Flags {
name := f.Names()[0]
if _, ok := want[name]; ok {
want[name] = true
}
}
for k, ok := range want {
if !ok {
t.Fatalf("missing flag: %s", k)
}
}
}