From c88ea9803f81ae1e5d1453033487fcbbd4f268de Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 31 Oct 2022 23:23:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96dash=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs b/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs index 3da3501..f019542 100644 --- a/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs +++ b/src/N_m3u8DL-RE.Parser/Extractor/DASHExtractor2.cs @@ -487,7 +487,12 @@ namespace N_m3u8DL_RE.Parser.Extractor var newStreams = await ExtractStreamsAsync(rawText); foreach (var streamSpec in streamSpecs) { + //有的网站每次请求MPD返回的码率不一致,导致ToShortString()无法匹配 无法更新playlist + //故增加通过init url来匹配 (如果有的话) var match = newStreams.Where(n => n.ToShortString() == streamSpec.ToShortString()); + if (!match.Any()) + match = newStreams.Where(n => n.Playlist?.MediaInit?.Url == streamSpec.Playlist?.MediaInit?.Url); + if (match.Any()) streamSpec.Playlist!.MediaParts = match.First().Playlist!.MediaParts; //不更新init }