summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-30 12:49:44 +0000
committersr55 <[email protected]>2011-04-30 12:49:44 +0000
commit89e5b03264f0b272da9861a3f4a74adf235a10a6 (patch)
tree77dbd9528d8d8d15d5a8354c38bea049fda40528 /win/CS/HandBrake.ApplicationServices
parent1cd4e576275a12275601da3dce5a2b11a638644d (diff)
WinGui:
- Fix an issue where the user could overwrite a built-in preset. - Fix some more audio issues in relation to incorrect bitrate and sample rate being selected. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3970 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs7
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/PresetService.cs14
2 files changed, 20 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
index 1c688e79e..6a06586b2 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
@@ -105,7 +105,12 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
get
{
- return this.Bitrate == 0 ? "Auto" : this.Bitrate.ToString();
+ if (this.Encoder == AudioEncoder.Ac3Passthrough || this.Encoder == AudioEncoder.DtsPassthrough)
+ {
+ return "Auto";
+ }
+
+ return this.Bitrate.ToString();
}
}
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