mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
Adjust new format
This commit is contained in:
parent
0a6c4aa06f
commit
36ccb39cce
@ -118,11 +118,18 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
var hideTime = parser.GetAllTagsByNameAsStrings(item, "HideTime");
|
||||
if (textLines.Count > 0 && showTime.Count == 1 && hideTime.Count == 1 && long.TryParse(showTime[0], out var startMs) && long.TryParse(hideTime[0], out var endMs))
|
||||
{
|
||||
subtitle.Paragraphs.Add(new Paragraph(string.Join(Environment.NewLine, textLines), startMs, endMs));
|
||||
var p = new Paragraph(string.Join(Environment.NewLine, textLines), startMs, endMs);
|
||||
|
||||
var className = parser.GetAllTagsByNameAsStrings(item, "ClassName");
|
||||
if (className.Count == 1)
|
||||
{
|
||||
p.Language = className[0];
|
||||
}
|
||||
|
||||
subtitle.Paragraphs.Add(p);
|
||||
}
|
||||
}
|
||||
|
||||
subtitle.Sort(Enums.SubtitleSortCriteria.StartTime);
|
||||
subtitle.RemoveEmptyLines();
|
||||
subtitle.Renumber();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user