From 21e3970a5048bd5fe2f7a51a0c008c474eca32b5 Mon Sep 17 00:00:00 2001 From: nilaoda Date: Mon, 31 Oct 2022 23:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A9=BAsrt=EF=BC=88?= =?UTF-8?q?=E4=B8=BA=E4=BA=86=E6=B7=B7=E6=B5=81=E4=B8=8D=E6=8A=A5=E9=94=99?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/N_m3u8DL-RE/Util/OtherUtil.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE/Util/OtherUtil.cs b/src/N_m3u8DL-RE/Util/OtherUtil.cs index 1c55278..bc0a8c2 100644 --- a/src/N_m3u8DL-RE/Util/OtherUtil.cs +++ b/src/N_m3u8DL-RE/Util/OtherUtil.cs @@ -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)