summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-05-12 19:48:41 +0100
committersr55 <[email protected]>2016-05-12 19:48:41 +0100
commit16314ab0db954c46f64632e4111836061bd9748d (patch)
tree31e4e782eef340b81be7c5ad435ca79295f49aa3 /win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
parentc2ddfa317feb249bc4c39e986e9e60f9208bde0a (diff)
WinGui: Add a track list on the Audio Defaults screen. This changes the behaviour to match the Mac and Linux GUIs. So you no longer have to have a source audio track before you can create presets.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs19
1 files changed, 6 insertions, 13 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 86f8b36d2..2706e8e83 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -79,11 +79,6 @@ namespace HandBrakeWPF.ViewModels
public IAudioDefaultsViewModel AudioDefaultsViewModel { get; set; }
/// <summary>
- /// Gets or sets AudioBitrates.
- /// </summary>
- public IEnumerable<int> AudioBitrates { get; set; }
-
- /// <summary>
/// Gets or sets AudioEncoders.
/// </summary>
public IEnumerable<AudioEncoder> AudioEncoders { get; set; }
@@ -343,13 +338,13 @@ namespace HandBrakeWPF.ViewModels
this.Task.AudioTracks.Add(new AudioTrack { ScannedTrack = track });
break;
case AudioTrackDefaultsMode.FirstTrack:
- AudioTrack template = this.currentPreset.Task.AudioTracks.FirstOrDefault();
- this.Task.AudioTracks.Add(template != null ? new AudioTrack(template, false) { ScannedTrack = track } : new AudioTrack { ScannedTrack = track });
+ AudioBehaviourTrack template = this.currentPreset.AudioTrackBehaviours.BehaviourTracks.FirstOrDefault();
+ this.Task.AudioTracks.Add(template != null ? new AudioTrack(template) { ScannedTrack = track } : new AudioTrack { ScannedTrack = track });
break;
case AudioTrackDefaultsMode.AllTracks:
- foreach (AudioTrack tmpl in this.currentPreset.Task.AudioTracks)
+ foreach (AudioBehaviourTrack tmpl in this.currentPreset.AudioTrackBehaviours.BehaviourTracks)
{
- this.Task.AudioTracks.Add(tmpl != null ? new AudioTrack(tmpl, false) { ScannedTrack = track } : new AudioTrack { ScannedTrack = track });
+ this.Task.AudioTracks.Add(tmpl != null ? new AudioTrack(tmpl) { ScannedTrack = track } : new AudioTrack { ScannedTrack = track });
}
break;
@@ -399,9 +394,9 @@ namespace HandBrakeWPF.ViewModels
}
// Step 3, Setup the tracks from the preset
- foreach (AudioTrack track in this.currentPreset.Task.AudioTracks)
+ foreach (AudioBehaviourTrack track in this.currentPreset.AudioTrackBehaviours.BehaviourTracks)
{
- this.Task.AudioTracks.Add(new AudioTrack(track, false) { ScannedTrack = this.GetPreferredAudioTrack() });
+ this.Task.AudioTracks.Add(new AudioTrack(track) { ScannedTrack = this.GetPreferredAudioTrack() });
}
// Step 4, Handle the default selection behaviour.
@@ -517,8 +512,6 @@ namespace HandBrakeWPF.ViewModels
return trackList;
}
-
-
#endregion
}
} \ No newline at end of file