优先识别contentType而非mimeType

This commit is contained in:
nilaoda 2022-07-10 12:47:47 +08:00
parent 4b11a163c3
commit ed28e92b43
1 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ namespace N_m3u8DL_RE.Parser.Extractor
//处理baseurl嵌套 //处理baseurl嵌套
segBaseUrl = ExtendBaseUrl(adaptationSet, segBaseUrl); segBaseUrl = ExtendBaseUrl(adaptationSet, segBaseUrl);
var mimeType = adaptationSet.Attribute("mimeType")?.Value; var mimeType = adaptationSet.Attribute("contentType")?.Value ?? adaptationSet.Attribute("mimeType")?.Value;
var frameRate = GetFrameRate(adaptationSet); var frameRate = GetFrameRate(adaptationSet);
//本AdaptationSet中的全部Representation //本AdaptationSet中的全部Representation
var representations = adaptationSet.Elements().Where(e => e.Name.LocalName == "Representation"); var representations = adaptationSet.Elements().Where(e => e.Name.LocalName == "Representation");
@ -126,7 +126,7 @@ namespace N_m3u8DL_RE.Parser.Extractor
if (mimeType == null) if (mimeType == null)
{ {
mimeType = representation.Attribute("mimeType")?.Value ?? ""; mimeType = representation.Attribute("contentType")?.Value ?? representation.Attribute("mimeType")?.Value ?? "";
} }
var bandwidth = representation.Attribute("bandwidth"); var bandwidth = representation.Attribute("bandwidth");
StreamSpec streamSpec = new(); StreamSpec streamSpec = new();