From 69f4df1aad19226b0d980b5076810d873bca7498 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 17 Jan 2016 17:29:26 +0000 Subject: WinGui: Fix Preset json file import. --- win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'win/CS/HandBrakeWPF/Services/Presets/PresetService.cs') diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index 6e6935f00..9b470cb06 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -151,11 +151,12 @@ namespace HandBrakeWPF.Services.Presets } // HBPreset Handling - IList hbPresets = container.PresetList as IList; - if (hbPresets != null) + if (container.PresetList != null) { - foreach (var hbPreset in hbPresets) + foreach (var objectPreset in container.PresetList) { + HBPreset hbPreset = JsonConvert.DeserializeObject(objectPreset.ToString()); + Preset preset = null; try { @@ -180,7 +181,7 @@ namespace HandBrakeWPF.Services.Presets return; } - if (this.CheckIfPresetExists(preset.Name)) + if (this.CheckIfPresetExists(preset.Name)) { if (!this.CanUpdatePreset(preset.Name)) { -- cgit v1.2.3