From 1815e333394ff3c26cbc66046d254399fb85f3a4 Mon Sep 17 00:00:00 2001 From: dilap54 Date: Fri, 7 Feb 2025 16:31:17 +0300 Subject: [PATCH] m3u8_native --- goutubedl.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/goutubedl.go b/goutubedl.go index cb0f70d..7aa897a 100644 --- a/goutubedl.go +++ b/goutubedl.go @@ -185,10 +185,11 @@ type Subtitle struct { } type Caption struct { - Ext string `json:"ext"` - URL string `json:"url"` - Name string `json:"name"` - Bytes []byte `json:"-"` + Ext string `json:"ext"` + Protocol string `json:"protocol"` + URL string `json:"url"` + Name string `json:"name"` + Bytes []byte `json:"-"` } func (f Format) String() string { @@ -495,6 +496,12 @@ func infoFromURL( if options.DownloadSubtitlesFormat != "" && caption.Ext != options.DownloadSubtitlesFormat { continue } + + // filter out m3u8_native protocol + if caption.Protocol != "" { + continue + } + resp, respErr := get(caption.URL) if respErr == nil { buf, err := io.ReadAll(resp.Body)