优化lang,codecs识别

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

View File

@ -134,8 +134,8 @@ namespace N_m3u8DL_RE.Parser.Extractor
streamSpec.Playlist.MediaParts.Add(new MediaPart());
streamSpec.GroupId = representation.Attribute("id")?.Value;
streamSpec.Bandwidth = Convert.ToInt32(bandwidth?.Value ?? "0");
streamSpec.Codecs = representation.Attribute("codecs")?.Value;
streamSpec.Language = representation.Attribute("lang")?.Value;
streamSpec.Codecs = representation.Attribute("codecs")?.Value ?? adaptationSet.Attribute("codecs")?.Value;
streamSpec.Language = representation.Attribute("lang")?.Value ?? adaptationSet.Attribute("lang")?.Value;
streamSpec.FrameRate = frameRate ?? GetFrameRate(representation);
streamSpec.Resolution = representation.Attribute("width")?.Value != null ? $"{representation.Attribute("width")?.Value}x{representation.Attribute("height")?.Value}" : null;
streamSpec.Url = MpdUrl;