public static Chapter Parse(StringReader output)\r
{\r
// TODO add support for reading chapter names to the regex.\r
- Match m = Regex.Match(\r
- output.ReadLine(),\r
- @"^ \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
+ string line = output.ReadLine();\r
+ Match m = Regex.Match(line, @"^ \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
if (m.Success)\r
{\r
var thisChapter = new Chapter\r
{\r
nextLine = output.ReadLine();\r
}\r
- \r
+\r
// Multi-Angle Support if LibDvdNav is enabled\r
- if (!isDvdNavDisabled)\r
+ m = Regex.Match(nextLine, @" \+ angle\(s\) ([0-9]*)");\r
+ if (m.Success)\r
{\r
- m = Regex.Match(nextLine, @" \+ angle\(s\) ([0-9])");\r
- if (m.Success)\r
- {\r
- string angleList = m.Value.Replace("+ angle(s) ", string.Empty).Trim();\r
- int angleCount;\r
- int.TryParse(angleList, out angleCount);\r
-\r
- thisTitle.AngleCount = angleCount;\r
- nextLine = output.ReadLine();\r
- }\r
+ string angleList = m.Value.Replace("+ angle(s) ", string.Empty).Trim();\r
+ int angleCount;\r
+ int.TryParse(angleList, out angleCount);\r
+\r
+ thisTitle.AngleCount = angleCount;\r
+ nextLine = output.ReadLine();\r
}\r
\r
// Get duration for this title\r