diff options
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs index b87119205..2f6afe626 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs @@ -75,13 +75,14 @@ namespace HandBrakeWPF.Services.Presets.Factories preset.Task.MaxHeight = importedPreset.PictureHeight.HasValue && importedPreset.PictureHeight.Value > 0 ? importedPreset.PictureHeight.Value : (int?)null;
preset.Task.Cropping = new Cropping(importedPreset.PictureTopCrop, importedPreset.PictureBottomCrop, importedPreset.PictureLeftCrop, importedPreset.PictureRightCrop);
preset.Task.HasCropping = !importedPreset.PictureAutoCrop;
-
preset.Task.Modulus = importedPreset.PictureModulus;
preset.Task.KeepDisplayAspect = importedPreset.PictureKeepRatio;
+
switch (importedPreset.PicturePAR)
{
case "custom":
preset.Task.Anamorphic = Anamorphic.Custom;
+ preset.Task.DisplayWidth = importedPreset.PictureDARWidth;
break;
case "loose":
preset.Task.Anamorphic = Anamorphic.Loose;
@@ -407,7 +408,6 @@ namespace HandBrakeWPF.Services.Presets.Factories // public List<object> ChildrenArray { get; set; }
// public bool Folder { get; set; }
// public bool FolderOpen { get; set; }
- // public int PictureDARWidth { get; set; }
// public int Type { get; set; }
return preset;
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))
{
|