diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs | 5 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Parsing/Title.cs | 21 |
2 files changed, 11 insertions, 15 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs index eb0313317..00870552f 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Chapter.cs @@ -72,9 +72,8 @@ namespace HandBrake.ApplicationServices.Parsing public static Chapter Parse(StringReader output)
{
// TODO add support for reading chapter names to the regex.
- Match m = Regex.Match(
- output.ReadLine(),
- @"^ \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");
+ string line = output.ReadLine();
+ 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})");
if (m.Success)
{
var thisChapter = new Chapter
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs index f834c4fa9..af5788f41 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Title.cs @@ -167,20 +167,17 @@ namespace HandBrake.ApplicationServices.Parsing {
nextLine = output.ReadLine();
}
-
+
// Multi-Angle Support if LibDvdNav is enabled
- if (!isDvdNavDisabled)
+ m = Regex.Match(nextLine, @" \+ angle\(s\) ([0-9]*)");
+ if (m.Success)
{
- m = Regex.Match(nextLine, @" \+ angle\(s\) ([0-9])");
- if (m.Success)
- {
- string angleList = m.Value.Replace("+ angle(s) ", string.Empty).Trim();
- int angleCount;
- int.TryParse(angleList, out angleCount);
-
- thisTitle.AngleCount = angleCount;
- nextLine = output.ReadLine();
- }
+ string angleList = m.Value.Replace("+ angle(s) ", string.Empty).Trim();
+ int angleCount;
+ int.TryParse(angleList, out angleCount);
+
+ thisTitle.AngleCount = angleCount;
+ nextLine = output.ReadLine();
}
// Get duration for this title
|