also require Options.PlaylistIndex for TypeChannel

This commit is contained in:
Joseph
2024-02-24 10:22:35 +00:00
parent 7f2357b6ae
commit 3f0fe87c2e

View File

@ -524,7 +524,9 @@ func (result Result) DownloadWithOptions(
debugLog := result.Options.DebugLog debugLog := result.Options.DebugLog
if !result.Options.noInfoDownload { 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 { options.PlaylistIndex == 0 {
return nil, fmt.Errorf( return nil, fmt.Errorf(
"can't download a playlist when the playlist index options is not set", "can't download a playlist when the playlist index options is not set",