summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-05-29 17:31:58 +0000
committersr55 <[email protected]>2013-05-29 17:31:58 +0000
commitbffc8a4ab97bcd4630496c62be4720e0c590f1fa (patch)
treede2a7bac1438c0dbec660388fee636053ef3a96b /win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
parente0c83de39ee1c7533842c566b4cbea80c0257f99 (diff)
WinGui: Use ISO639-2 Codes rather than language names for auto language selection
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5524 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 2146b1c6c..ee9b09f31 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -38,6 +38,9 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
private IEnumerable<Audio> sourceTracks;
+ /// <summary>
+ /// The current preset.
+ /// </summary>
private Preset currentPreset;
#region Constructors and Destructors
@@ -414,9 +417,15 @@ namespace HandBrakeWPF.ViewModels
private IEnumerable<Audio> GetSelectedLanguagesTracks()
{
List<Audio> trackList = new List<Audio>();
- foreach (string language in this.UserSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages))
+
+
+ List<string> isoCodes =
+ LanguageUtilities.GetLanguageCodes(
+ this.UserSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages));
+
+ foreach (string code in isoCodes)
{
- trackList.AddRange(this.SourceTracks.Where(source => source.Language.Trim() == language));
+ trackList.AddRange(this.SourceTracks.Where(source => source.LanguageCode.Trim() == code));
}
return trackList;