summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/PresetService.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/PresetService.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
index 6381bb177..e4f67b7db 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
@@ -294,6 +294,20 @@ namespace HandBrake.ApplicationServices.Services
return name == string.Empty || this.presets.Any(item => item.Name == name);
}
+ /// <summary>
+ /// Returns a value if the preset can be updated / resaved
+ /// </summary>
+ /// <param name="name">
+ /// The name.
+ /// </param>
+ /// <returns>
+ /// True if it's not a built-in preset, false otherwise.
+ /// </returns>
+ public bool CanUpdatePreset(string name)
+ {
+ return this.presets.Where(preset => preset.Name == name).Any(preset => preset.IsBuildIn == false);
+ }
+
#endregion
#region Private Helpers