summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorAndrij Abyzov <[email protected]>2016-08-28 00:30:03 +0200
committerAndrij Abyzov <[email protected]>2016-08-28 00:30:03 +0200
commit87bfb4497ba4a0cfdb782bad932998f3dfbd319b (patch)
tree312c306b3efbe4d5122871c4fdbf2b4b4564b104 /win/CS/HandBrakeWPF/ViewModels
parent429fce1f691d8665b625e3293658f3be6d317b46 (diff)
Fix an issue applying audio codec settings from the defaults which are different from the current preset.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 7c7c3df3c..232ed3567 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -332,17 +332,17 @@ namespace HandBrakeWPF.ViewModels
return;
}
- switch (this.AudioDefaultsViewModel.AudioBehaviours.SelectedTrackDefaultBehaviour)
+ switch (this.AudioBehaviours.SelectedTrackDefaultBehaviour)
{
case AudioTrackDefaultsMode.None:
this.Task.AudioTracks.Add(new AudioTrack { ScannedTrack = track });
break;
case AudioTrackDefaultsMode.FirstTrack:
- AudioBehaviourTrack template = this.currentPreset.AudioTrackBehaviours.BehaviourTracks.FirstOrDefault();
+ AudioBehaviourTrack template = this.AudioBehaviours.BehaviourTracks.FirstOrDefault();
this.Task.AudioTracks.Add(template != null ? new AudioTrack(template) { ScannedTrack = track } : new AudioTrack { ScannedTrack = track });
break;
case AudioTrackDefaultsMode.AllTracks:
- foreach (AudioBehaviourTrack tmpl in this.currentPreset.AudioTrackBehaviours.BehaviourTracks)
+ foreach (AudioBehaviourTrack tmpl in this.AudioBehaviours.BehaviourTracks)
{
this.Task.AudioTracks.Add(tmpl != null ? new AudioTrack(tmpl) { ScannedTrack = track } : new AudioTrack { ScannedTrack = track });
}
@@ -400,7 +400,7 @@ namespace HandBrakeWPF.ViewModels
}
// Step 4, Handle the default selection behaviour.
- switch (this.AudioDefaultsViewModel.AudioBehaviours.SelectedBehaviour)
+ switch (this.AudioBehaviours.SelectedBehaviour)
{
case AudioBehaviourModes.None:
this.Task.AudioTracks.Clear();
@@ -472,9 +472,9 @@ namespace HandBrakeWPF.ViewModels
// The first track in the selected languages list is considered the preferred language.
// So, try match tracks on this.
IEnumerable<Audio> preferredAudioTracks = new List<Audio>();
- if (this.AudioDefaultsViewModel.AudioBehaviours.SelectedLangauges.Count > 0)
+ if (this.AudioBehaviours.SelectedLangauges.Count > 0)
{
- string langName = this.AudioDefaultsViewModel.AudioBehaviours.SelectedLangauges.FirstOrDefault(w => !w.Equals(Constants.Any));
+ string langName = this.AudioBehaviours.SelectedLangauges.FirstOrDefault(w => !w.Equals(Constants.Any));
if (!string.IsNullOrEmpty(langName))
{
preferredAudioTracks = this.SourceTracks.Where(item => item.Language.Contains(langName));
@@ -497,7 +497,7 @@ namespace HandBrakeWPF.ViewModels
{
List<Audio> trackList = new List<Audio>();
- List<string> isoCodes = LanguageUtilities.GetLanguageCodes(this.AudioDefaultsViewModel.AudioBehaviours.SelectedLangauges.ToArray());
+ List<string> isoCodes = LanguageUtilities.GetLanguageCodes(this.AudioBehaviours.SelectedLangauges.ToArray());
if (includeAny)
{