再优化文件后缀推断

This commit is contained in:
nilaoda 2022-07-19 00:55:42 +08:00
parent e57f95da96
commit 79b4b68469
1 changed files with 2 additions and 1 deletions

View File

@ -423,12 +423,13 @@ namespace N_m3u8DL_RE.Parser.Extractor
}
else
{
//修复mp4类型字幕
if (streamSpec.MediaType == MediaType.SUBTITLES && streamSpec.Extension == "mp4")
{
streamSpec.Extension = "m4s";
}
//分片默认后缀m4s
if (streamSpec.Extension == null || streamSpec.Playlist.MediaParts.Sum(x => x.MediaSegments.Count) > 1)
if (streamSpec.MediaType != MediaType.SUBTITLES && (streamSpec.Extension == null || streamSpec.Playlist.MediaParts.Sum(x => x.MediaSegments.Count) > 1))
{
streamSpec.Extension = "m4s";
}