summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/Constants.cs5
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs11
2 files changed, 9 insertions, 7 deletions
diff --git a/win/CS/HandBrakeWPF/Constants.cs b/win/CS/HandBrakeWPF/Constants.cs
index c47bc8dc1..49e0183c5 100644
--- a/win/CS/HandBrakeWPF/Constants.cs
+++ b/win/CS/HandBrakeWPF/Constants.cs
@@ -40,6 +40,11 @@ namespace HandBrakeWPF
public const string Any = "(Any)";
/// <summary>
+ /// Undefined Language
+ /// </summary>
+ public const string Undefined = "und";
+
+ /// <summary>
/// The chapters.
/// </summary>
public const string Chapters = "{chapters}";
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 9f3cd760d..1381fcca0 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -418,7 +418,7 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
private void AddFirstForSelectedLanguages()
{
- foreach (Audio sourceTrack in this.GetSelectedLanguagesTracks(false))
+ foreach (Audio sourceTrack in this.GetSelectedLanguagesTracks())
{
// Step 2: Check if the track list already contrains this track
bool found = this.Task.AudioTracks.Any(audioTrack => Equals(audioTrack.ScannedTrack, sourceTrack));
@@ -448,7 +448,7 @@ namespace HandBrakeWPF.ViewModels
public void AddAllRemainingForSelectedLanguages()
{
// Add them if they are not already added.
- foreach (Audio sourceTrack in this.GetSelectedLanguagesTracks(false))
+ foreach (Audio sourceTrack in this.GetSelectedLanguagesTracks())
{
// Step 2: Check if the track list already contrains this track
bool found = this.Task.AudioTracks.Any(audioTrack => Equals(audioTrack.ScannedTrack, sourceTrack));
@@ -486,19 +486,16 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Gets a list of source tracks for the users selected languages.
/// </summary>
- /// <param name="includeAny">
- /// The include Any.
- /// </param>
/// <returns>
/// A list of source audio tracks.
/// </returns>
- private IEnumerable<Audio> GetSelectedLanguagesTracks(bool includeAny)
+ private IEnumerable<Audio> GetSelectedLanguagesTracks()
{
List<Audio> trackList = new List<Audio>();
List<string> isoCodes = LanguageUtilities.GetLanguageCodes(this.AudioBehaviours.SelectedLangauges.ToArray());
- if (includeAny)
+ if (isoCodes.Contains(Constants.Undefined))
{
isoCodes = LanguageUtilities.GetIsoCodes();
}