From: sr55 Date: Wed, 22 Oct 2008 15:59:05 +0000 (+0000) Subject: WinGui: X-Git-Tag: 0.9.3~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=226447cbf8d4f5b5717af4756d263c0fa7bcaf90;p=handbrake WinGui: - 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 --- diff --git a/win/C#/Functions/Presets.cs b/win/C#/Functions/Presets.cs index 3faa8b8d6..20106727b 100644 --- a/win/C#/Functions/Presets.cs +++ b/win/C#/Functions/Presets.cs @@ -194,10 +194,10 @@ namespace Handbrake.Functions StreamReader presetInput = new StreamReader(filePath); while (!presetInput.EndOfStream) { - if ((char)presetInput.Peek() == '+') - presets.Add(presetInput.ReadLine().Replace("+ ", "")); - else - presetInput.ReadLine(); + string line = presetInput.ReadLine(); + + if (line.Contains("+")) + presets.Add(line.Replace("+ ", "").Trim()); } presetInput.Close(); presetInput.Dispose();