Remove Zero Width Space
This commit is contained in:
parent
d21d3924cc
commit
1aef2a7504
|
@ -22,6 +22,17 @@ namespace N_m3u8DL_RE.Common.Entity
|
|||
return Parse(Encoding.UTF8.GetString(textBytes));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从字节数组解析WEBVTT
|
||||
/// </summary>
|
||||
/// <param name="textBytes"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <returns></returns>
|
||||
public static WebSub Parse(byte[] textBytes, Encoding encoding)
|
||||
{
|
||||
return Parse(encoding.GetString(textBytes));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从字符串解析WEBVTT
|
||||
/// </summary>
|
||||
|
@ -66,7 +77,7 @@ 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;
|
||||
|
|
Loading…
Reference in New Issue