mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Improved compablity for the BdnXml subtitle format (thx Tom)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@496 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
8212a92838
commit
0dabf2779f
@ -104,7 +104,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
string end = node.Attributes["OutTC"].InnerText;
|
||||
string text = node.SelectSingleNode("Graphic").InnerText;
|
||||
Paragraph p = new Paragraph(text, GetMillisecondsFromTimeCode(start), GetMillisecondsFromTimeCode(end));
|
||||
if (node.Attributes["Forced"] != null && node.Attributes["Forced"].InnerText.ToLower() == "true")
|
||||
if (node.Attributes["Forced"] != null && node.Attributes["Forced"].Value.ToLower() == "true")
|
||||
p.Forced = true;
|
||||
subtitle.Paragraphs.Add(p);
|
||||
}
|
||||
@ -119,7 +119,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
private double GetMillisecondsFromTimeCode(string time)
|
||||
{
|
||||
string[] arr = time.Split(":".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] arr = time.Split(":;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
return new TimeSpan(0, int.Parse(arr[0]), int.Parse(arr[1]), int.Parse(arr[2]), int.Parse(arr[3])).TotalMilliseconds;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user