]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix a bug in the scan engine that caused problems with multi-angle discs.
authorsr55 <sr55.hb@outlook.com>
Wed, 20 Mar 2013 20:50:58 +0000 (20:50 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 20 Mar 2013 20:50:58 +0000 (20:50 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5352 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs
win/CS/HandBrake.ApplicationServices/Parsing/Title.cs

index eb0313317471e1f2a23e6797aed170e599142eeb..00870552fd048adb3516ae55ce06f2a7db2a432e 100644 (file)
@@ -72,9 +72,8 @@ namespace HandBrake.ApplicationServices.Parsing
         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
index f834c4fa9c547cd43a8d71774d554ad004fb9138..af5788f41c0c63579c01f9828a8905baff225ad0 100644 (file)
@@ -167,20 +167,17 @@ namespace HandBrake.ApplicationServices.Parsing
             {\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