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:
niksedk 2011-06-15 20:40:07 +00:00
parent 8212a92838
commit 0dabf2779f

View File

@ -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;
}