优化lang,codecs识别
This commit is contained in:
parent
ed28e92b43
commit
215cb2ae64
|
@ -134,8 +134,8 @@ namespace N_m3u8DL_RE.Parser.Extractor
|
||||||
streamSpec.Playlist.MediaParts.Add(new MediaPart());
|
streamSpec.Playlist.MediaParts.Add(new MediaPart());
|
||||||
streamSpec.GroupId = representation.Attribute("id")?.Value;
|
streamSpec.GroupId = representation.Attribute("id")?.Value;
|
||||||
streamSpec.Bandwidth = Convert.ToInt32(bandwidth?.Value ?? "0");
|
streamSpec.Bandwidth = Convert.ToInt32(bandwidth?.Value ?? "0");
|
||||||
streamSpec.Codecs = representation.Attribute("codecs")?.Value;
|
streamSpec.Codecs = representation.Attribute("codecs")?.Value ?? adaptationSet.Attribute("codecs")?.Value;
|
||||||
streamSpec.Language = representation.Attribute("lang")?.Value;
|
streamSpec.Language = representation.Attribute("lang")?.Value ?? adaptationSet.Attribute("lang")?.Value;
|
||||||
streamSpec.FrameRate = frameRate ?? GetFrameRate(representation);
|
streamSpec.FrameRate = frameRate ?? GetFrameRate(representation);
|
||||||
streamSpec.Resolution = representation.Attribute("width")?.Value != null ? $"{representation.Attribute("width")?.Value}x{representation.Attribute("height")?.Value}" : null;
|
streamSpec.Resolution = representation.Attribute("width")?.Value != null ? $"{representation.Attribute("width")?.Value}x{representation.Attribute("height")?.Value}" : null;
|
||||||
streamSpec.Url = MpdUrl;
|
streamSpec.Url = MpdUrl;
|
||||||
|
|
Loading…
Reference in New Issue