优化空srt(为了混流不报错)

This commit is contained in:
nilaoda 2022-10-31 23:55:27 +08:00
parent 27191240f4
commit 21e3970a50
1 changed files with 9 additions and 1 deletions

View File

@ -39,7 +39,15 @@ namespace N_m3u8DL_RE.Util
sb.AppendLine();
}
sb.AppendLine();
return sb.ToString();
var srt = sb.ToString();
if (string.IsNullOrEmpty(srt.Trim()))
{
srt = "1\r\n00:00:00,000 --> 00:00:01,000"; //空字幕
}
return srt;
}
public static string WebVtt2Other(WebVttSub vtt, SubtitleFormat toFormat)