- 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
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