mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 13:12:39 +01:00
parent
d0d55f202d
commit
03515f1786
@ -53,19 +53,17 @@ namespace Nikse.SubtitleEdit.Core.ContainerFormats.Matroska
|
||||
{
|
||||
}
|
||||
|
||||
public long End
|
||||
{
|
||||
get
|
||||
{
|
||||
return Start + Duration;
|
||||
}
|
||||
}
|
||||
public long End => Start + Duration;
|
||||
|
||||
public string GetText(MatroskaTrackInfo matroskaTrackInfo)
|
||||
{
|
||||
var data = GetData(matroskaTrackInfo);
|
||||
if (data != null)
|
||||
return System.Text.Encoding.UTF8.GetString(data).Replace("\\N", Environment.NewLine);
|
||||
{
|
||||
return System.Text.Encoding.UTF8.GetString(data)
|
||||
.Replace("\\N", Environment.NewLine)
|
||||
.Replace("\0", string.Empty);
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -2271,7 +2271,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
comments.Paragraphs.RemoveAt(commentIndex);
|
||||
}
|
||||
|
||||
string text = mp.GetText(matroskaSubtitleInfo).Replace(Environment.NewLine, "\\N");
|
||||
string text = mp.GetText(matroskaSubtitleInfo)
|
||||
.Replace(Environment.NewLine + Environment.NewLine, "\\N")
|
||||
.Replace(Environment.NewLine, "\\N");
|
||||
int idx = text.IndexOf(',') + 1;
|
||||
if (idx > 0 && idx < text.Length)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user