summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-02-07 21:32:16 +0000
committersr55 <[email protected]>2016-02-07 21:32:16 +0000
commit4827c1fefdef10053318477c2eed6386b374a779 (patch)
tree6dd65cdd450e894cff6b30ff1647ef8d639e1a25 /win/CS/HandBrakeWPF/Services
parent8ce01f3f60df3e2065e44bdf2629f81b7b10b2b6 (diff)
WinGui: Fixes to the refactored Audio Defaults View. Settings were not getting applied correctly.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/Models/AllowedPassthru.cs17
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs18
2 files changed, 27 insertions, 8 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AllowedPassthru.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AllowedPassthru.cs
index 9586e1632..47ec12828 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AllowedPassthru.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AllowedPassthru.cs
@@ -165,7 +165,22 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
return audioEncoders;
}
- }
+ }
+
+ /// <summary>
+ /// Disable the passthru options.
+ /// </summary>
+ public void SetFalse()
+ {
+ this.AudioAllowAACPass = false;
+ this.AudioAllowAC3Pass = false;
+ this.AudioAllowDTSHDPass = false;
+ this.AudioAllowDTSPass = false;
+ this.AudioAllowMP3Pass = false;
+ this.AudioAllowEAC3Pass = false;
+ this.AudioAllowTrueHDPass = false;
+ this.AudioAllowFlacPass = false;
+ }
#endregion
}
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
index dbb702a77..4a464a68b 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
@@ -319,31 +319,35 @@ namespace HandBrakeWPF.Services.Presets.Factories
if (importedPreset.AudioCopyMask != null)
{
+ preset.Task.AllowedPassthruOptions.SetFalse();
foreach (var item in importedPreset.AudioCopyMask)
{
- AudioEncoder encoder = EnumHelper<AudioEncoder>.GetValue(item.ToString());
+ AudioEncoder encoder = EnumHelper<AudioEncoder>.GetValue(item);
switch (encoder)
{
case AudioEncoder.AacPassthru:
preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
break;
case AudioEncoder.Ac3Passthrough:
- preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
+ preset.Task.AllowedPassthruOptions.AudioAllowAC3Pass = true;
break;
case AudioEncoder.EAc3Passthrough:
- preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
+ preset.Task.AllowedPassthruOptions.AudioAllowEAC3Pass = true;
break;
case AudioEncoder.DtsHDPassthrough:
- preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
+ preset.Task.AllowedPassthruOptions.AudioAllowDTSHDPass = true;
break;
case AudioEncoder.DtsPassthrough:
- preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
+ preset.Task.AllowedPassthruOptions.AudioAllowDTSPass = true;
break;
case AudioEncoder.FlacPassthru:
- preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
+ preset.Task.AllowedPassthruOptions.AudioAllowFlacPass = true;
break;
case AudioEncoder.Mp3Passthru:
- preset.Task.AllowedPassthruOptions.AudioAllowAACPass = true;
+ preset.Task.AllowedPassthruOptions.AudioAllowMP3Pass = true;
+ break;
+ case AudioEncoder.TrueHDPassthrough:
+ preset.Task.AllowedPassthruOptions.AudioAllowTrueHDPass = true;
break;
}
}