]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Wed, 22 Oct 2008 15:59:05 +0000 (15:59 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 22 Oct 2008 15:59:05 +0000 (15:59 +0000)
- Updated to read the new preset-list output format. Nested presets support code will come later.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1858 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Functions/Presets.cs

index 3faa8b8d61a6b28d08d1fcf598e3c8df168fb0ee..20106727b72065bcbf584fd75009c21dd225a383 100644 (file)
@@ -194,10 +194,10 @@ namespace Handbrake.Functions
                 StreamReader presetInput = new StreamReader(filePath);\r
                 while (!presetInput.EndOfStream)\r
                 {\r
-                    if ((char)presetInput.Peek() == '+')\r
-                        presets.Add(presetInput.ReadLine().Replace("+ ", ""));\r
-                    else\r
-                        presetInput.ReadLine();\r
+                    string line = presetInput.ReadLine();\r
+\r
+                    if (line.Contains("+"))\r
+                        presets.Add(line.Replace("+ ", "").Trim());\r
                 }\r
                 presetInput.Close();\r
                 presetInput.Dispose();\r