@@ -91,6 +91,36 @@ func TestTwitchVideoDownloadArgsPreferFFmpegForHLS(t *testing.T) {
9191 }
9292}
9393
94+ func TestAppendYtDlpVideoConfigArgsExcludesOutputOptions (t * testing.T ) {
95+ t .Parallel ()
96+
97+ initial := []string {"-o" , "/data/temp/video.%(ext)s" }
98+ configArgs := strings .Join ([]string {
99+ " --retries " , " 10 " , " " ,
100+ "-o" , "/tmp/short-separated" ,
101+ "--output" , "/tmp/long-separated" ,
102+ "-o=/tmp/short-equals" ,
103+ "-o/tmp/short-attached" ,
104+ "--output=/tmp/long-equals" ,
105+ "-P" , "/tmp/path-short-separated" ,
106+ "--paths" , "/tmp/path-long-separated" ,
107+ "-P=/tmp/path-short-equals" ,
108+ "-P/tmp/path-short-attached" ,
109+ "--paths=/tmp/path-long-equals" ,
110+ " --fragment-retries" , "20 " ,
111+ }, "," )
112+
113+ got := appendYtDlpVideoConfigArgs (initial , configArgs )
114+ want := []string {
115+ "-o" , "/data/temp/video.%(ext)s" ,
116+ "--retries" , "10" ,
117+ "--fragment-retries" , "20" ,
118+ }
119+ if ! reflect .DeepEqual (got , want ) {
120+ t .Fatalf ("appendYtDlpVideoConfigArgs() = %v, want %v" , got , want )
121+ }
122+ }
123+
94124func TestPostProcessVideoFFmpegArgsIncludesTitleMetadata (t * testing.T ) {
95125 t .Parallel ()
96126
0 commit comments