diff options
author | sr55 <[email protected]> | 2019-11-15 19:14:21 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2019-11-15 22:31:49 +0000 |
commit | 0984e37ac9fb050db6687d6ff89ac881a2fafecf (patch) | |
tree | a800d76a48d937e22227a4dfdddc93a13fc98c64 | |
parent | 78014a03bd7a8bf4e9b8f8d56d6f72b7ea2f3a65 (diff) |
WinGui: Force a built-in preset update on libhb preset version change. #2421
(cherry picked from commit 7584e783ef87186b60395c29b375e8ec25991c1b)
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/PresetService.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index 01dd40f51..9a46afc2b 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -18,6 +18,7 @@ namespace HandBrakeWPF.Services.Presets using System.IO;
using System.Linq;
using System.Windows;
+ using System.Windows.Documents;
using HandBrake.Interop.Interop;
using HandBrake.Interop.Interop.Json.Presets;
@@ -57,7 +58,6 @@ namespace HandBrakeWPF.Services.Presets private readonly IUserSettingService userSettingService;
private ILog log = LogService.GetLogger();
-
/// <summary>
/// Initializes a new instance of the <see cref="PresetService"/> class.
/// </summary>
@@ -725,8 +725,14 @@ namespace HandBrakeWPF.Services.Presets this.UpdateBuiltInPresets(); // Update built-in presets stores the presets locally, so just return.
return;
}
-
+
this.ProcessPresetList(container);
+
+ PresetVersion presetVersion = HandBrakePresetService.GetCurrentPresetVersion();
+ if (container.VersionMajor != presetVersion.Major || container.VersionMinor != presetVersion.Minor || container.VersionMicro != presetVersion.Micro)
+ {
+ this.UpdateBuiltInPresets();
+ }
}
catch (Exception ex)
{
|