OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 19 Nov 2009 21:10:25 +0000 (21:10 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 19 Nov 2009 21:10:25 +0000 (21:10 +0000)
- Fix Parser multi-angle support

git-svn-id: svn://localhost/HandBrake/trunk@2944 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Parsing/Title.cs

index 1a98a58..a88b7ba 100644 (file)
@@ -149,19 +149,15 @@ namespace Handbrake.Parsing
             if (!Properties.Settings.Default.noDvdNav)\r
             {\r
                 // Get the Angles for the title.\r
-                m = Regex.Match(output.ReadLine(), @"  \+ angle\(s\) ([0-9,])");\r
+                m = Regex.Match(output.ReadLine(), @"  \+ angle\(s\) ([0-9])");\r
                 if (m.Success)\r
                 {\r
                     String angleList = m.Value.Replace("+ angle(s) ", "").Trim();\r
+                    int angleCount;\r
+                    int.TryParse(angleList, out angleCount);\r
 \r
-                    if (angleList.Contains(","))\r
-                    {\r
-                        string[] angles = angleList.Split(',');\r
-                        foreach (string s in angles)\r
-                            thisTitle.m_angles.Add(s);\r
-                    }\r
-                    else\r
-                        thisTitle.m_angles.Add(m.Value.Replace("+ angle(s) ", "").Trim());\r
+                    for (int i = 1; i <= angleCount; i++)\r
+                        thisTitle.m_angles.Add(i.ToString());\r
                 }\r
             }\r
 \r