优化不存在视频的情况

This commit is contained in:
nilaoda 2023-06-15 10:41:10 +08:00
parent 87f0112813
commit 34deb6abfa
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ namespace N_m3u8DL_RE.Util
//MAP //MAP
for (int i = 0; i < files.Length; i++) for (int i = 0; i < files.Length; i++)
{ {
if (files[i].MediaType != Common.Enum.MediaType.AUDIO && files[i].MediaType != Common.Enum.MediaType.SUBTITLES) if (files[i].MediaType != Common.Enum.MediaType.AUDIO && files[i].MediaType != Common.Enum.MediaType.SUBTITLES && files[i].Mediainfos.Any(x => x.Type == "Video"))
{ {
var x = files[i].Mediainfos.FindIndex(x => x.Type == "Video"); var x = files[i].Mediainfos.FindIndex(x => x.Type == "Video");
//视频流只取视频 防止CC字幕导致的混流失败 //视频流只取视频 防止CC字幕导致的混流失败