diff options
author | sr55 <[email protected]> | 2016-01-17 17:29:26 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2016-01-17 17:43:31 +0000 |
commit | 69f4df1aad19226b0d980b5076810d873bca7498 (patch) | |
tree | 9917f8287c5f0f24624118a8f1ec92c8ccc815a5 /win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | |
parent | 8620ba14fb4b1580843f28d6aeeb5a3d2b1af1cd (diff) |
WinGui: Fix Preset json file import.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Presets/PresetService.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 9 |
1 files changed, 5 insertions, 4 deletions
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<HBPreset> hbPresets = container.PresetList as IList<HBPreset>;
- if (hbPresets != null)
+ if (container.PresetList != null)
{
- foreach (var hbPreset in hbPresets)
+ foreach (var objectPreset in container.PresetList)
{
+ HBPreset hbPreset = JsonConvert.DeserializeObject<HBPreset>(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))
{
|