From 3f0fe87c2e2d8cd3709fc205e4fee8adbc9d9db3 Mon Sep 17 00:00:00 2001 From: Joseph Date: Sat, 24 Feb 2024 10:22:35 +0000 Subject: [PATCH] also require Options.PlaylistIndex for TypeChannel --- goutubedl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/goutubedl.go b/goutubedl.go index 677cf60..f8c8f3b 100644 --- a/goutubedl.go +++ b/goutubedl.go @@ -524,7 +524,9 @@ func (result Result) DownloadWithOptions( debugLog := result.Options.DebugLog if !result.Options.noInfoDownload { - if (result.Info.Type == "playlist" || result.Info.Type == "multi_video") && + if (result.Info.Type == "playlist" || + result.Info.Type == "multi_video" || + result.Info.Type == "channel") && options.PlaylistIndex == 0 { return nil, fmt.Errorf( "can't download a playlist when the playlist index options is not set",