diff --git a/src/N_m3u8DL-RE.Common/Entity/WebSub.cs b/src/N_m3u8DL-RE.Common/Entity/WebSub.cs
index 01f3994..584b1cc 100644
--- a/src/N_m3u8DL-RE.Common/Entity/WebSub.cs
+++ b/src/N_m3u8DL-RE.Common/Entity/WebSub.cs
@@ -22,6 +22,17 @@ namespace N_m3u8DL_RE.Common.Entity
return Parse(Encoding.UTF8.GetString(textBytes));
}
+ ///
+ /// 从字节数组解析WEBVTT
+ ///
+ ///
+ ///
+ ///
+ public static WebSub Parse(byte[] textBytes, Encoding encoding)
+ {
+ return Parse(encoding.GetString(textBytes));
+ }
+
///
/// 从字符串解析WEBVTT
///
@@ -66,9 +77,9 @@ namespace N_m3u8DL_RE.Common.Entity
{
StartTime = startTime,
EndTime = endTime,
- Payload = payload,
+ Payload = string.Join("", payload.Where(c => c != 8203)), //Remove Zero Width Space!
Settings = style
- });
+ }) ;
needPayload = false;
}
}