diff options
author | sr55 <[email protected]> | 2013-05-29 17:31:58 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-05-29 17:31:58 +0000 |
commit | bffc8a4ab97bcd4630496c62be4720e0c590f1fa (patch) | |
tree | de2a7bac1438c0dbec660388fee636053ef3a96b /win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs | |
parent | e0c83de39ee1c7533842c566b4cbea80c0257f99 (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.cs | 13 |
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;
|