public static Title Parse(StringReader output)\r
{\r
var thisTitle = new Title();\r
+ string nextLine = output.ReadLine();\r
\r
- Match m = Regex.Match(output.ReadLine(), @"^\+ title ([0-9]*):");\r
- // Match track number for this title\r
+ // Get the Title Number\r
+ Match m = Regex.Match(nextLine, @"^\+ title ([0-9]*):");\r
if (m.Success)\r
thisTitle.TitleNumber = int.Parse(m.Groups[1].Value.Trim());\r
+ nextLine = output.ReadLine();\r
\r
- // If we are scanning a groupd of files, we'll want to get the source name.\r
- string path = output.ReadLine();\r
-\r
- m = Regex.Match(path, @" \+ Main Feature");\r
+ // Detect if this is the main feature\r
+ m = Regex.Match(nextLine, @" \+ Main Feature");\r
if (m.Success)\r
{\r
thisTitle.MainTitle = true;\r
- path = output.ReadLine();\r
+ nextLine = output.ReadLine();\r
}\r
\r
- m = Regex.Match(path, @"^ \+ stream:");\r
+ // Get the stream name for file import\r
+ m = Regex.Match(nextLine, @"^ \+ stream:");\r
if (m.Success)\r
- thisTitle.SourceName = path.Replace("+ stream:", string.Empty).Trim();\r
+ {\r
+ thisTitle.SourceName = nextLine.Replace("+ stream:", string.Empty).Trim();\r
+ nextLine = output.ReadLine();\r
+ }\r
\r
- string nextLine = output.ReadLine();\r
+ // Jump over the VTS and blocks line\r
+ m = Regex.Match(nextLine, @"^ \+ vts:");\r
+ if (nextLine.Contains("blocks") || nextLine.Contains("+ vts "))\r
+ {\r
+ nextLine = output.ReadLine();\r
+ }\r
+ \r
+ // Multi-Angle Support if LibDvdNav is enabled\r
if (!Init.DisableDvdNav)\r
{\r
- // Get the Angles for the title.\r
m = Regex.Match(nextLine, @" \+ angle\(s\) ([0-9])");\r
if (m.Success)\r
{\r