diff --git a/src/N_m3u8DL-RE.Parser/Extractor/IExtractor.cs b/src/N_m3u8DL-RE.Parser/Extractor/IExtractor.cs index 25c0c5f..e44bbf7 100644 --- a/src/N_m3u8DL-RE.Parser/Extractor/IExtractor.cs +++ b/src/N_m3u8DL-RE.Parser/Extractor/IExtractor.cs @@ -9,7 +9,7 @@ using N_m3u8DL_RE.Common.Enum; namespace N_m3u8DL_RE.Parser.Extractor { - internal interface IExtractor + public interface IExtractor { ExtractorType ExtractorType { get; } diff --git a/src/N_m3u8DL-RE.Parser/StreamExtractor.cs b/src/N_m3u8DL-RE.Parser/StreamExtractor.cs index dfc333d..f8f4c76 100644 --- a/src/N_m3u8DL-RE.Parser/StreamExtractor.cs +++ b/src/N_m3u8DL-RE.Parser/StreamExtractor.cs @@ -10,7 +10,7 @@ namespace N_m3u8DL_RE.Parser { public class StreamExtractor { - private IExtractor extractor; + public IExtractor Extractor { get; private set; } private ParserConfig parserConfig = new ParserConfig(); private string rawText; private static SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); @@ -56,13 +56,13 @@ namespace N_m3u8DL_RE.Parser if (rawText.StartsWith(HLSTags.ext_m3u)) { Logger.InfoMarkUp(ResString.matchHLS); - extractor = new HLSExtractor(parserConfig); + Extractor = new HLSExtractor(parserConfig); } else if (rawText.Contains("") && rawText.Contains(" s.Playlist == null)) + //HLS: 选中流中若有没加载出playlist的,加载playlist + //DASH: 加载playlist (调用url预处理器) + if (selectedStreams.Any(s => s.Playlist == null) || extractor.Extractor.ExtractorType == ExtractorType.MPEG_DASH) await extractor.FetchPlayListAsync(selectedStreams); //无法识别的加密方式,自动开启二进制合并