diff options
author | sr55 <[email protected]> | 2013-10-20 19:54:51 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-10-20 19:54:51 +0000 |
commit | 48047d258d3c9f577440d0d8053b8eb0d7021ec7 (patch) | |
tree | 22fba1e9aacf00d1f4b90168130919ed8bea21ce /win/CS/HandBrakeWPF/ViewModels | |
parent | 02786e4cc8a6ac8edfad11ab216d4e65b1ebeff4 (diff) |
WinGui: Add a "Add 'Foreign Audio Scan'" option to the Automatic Subtitle track selection feature.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5846 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 33 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs | 6 |
2 files changed, 35 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index bfe29b27b..19d42918a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -379,6 +379,11 @@ namespace HandBrakeWPF.ViewModels /// </summary>
private bool enableQuickSync;
+ /// <summary>
+ /// The add foreign audio scan track.
+ /// </summary>
+ private bool addForeignAudioScanTrack;
+
#endregion
#region Constructors and Destructors
@@ -1033,6 +1038,26 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether add foreign audio scan track.
+ /// </summary>
+ public bool AddForeignAudioScanTrack
+ {
+ get
+ {
+ return this.addForeignAudioScanTrack;
+ }
+ set
+ {
+ if (value.Equals(this.addForeignAudioScanTrack))
+ {
+ return;
+ }
+ this.addForeignAudioScanTrack = value;
+ this.NotifyOfPropertyChange(() => this.AddForeignAudioScanTrack);
+ }
+ }
+
#endregion
#region System and Logging
@@ -1420,7 +1445,7 @@ namespace HandBrakeWPF.ViewModels {
get
{
- return this.enableQuickSync;
+ return this.enableQuickSync && this.IsQuickSyncAvailable;
}
set
{
@@ -1880,7 +1905,7 @@ namespace HandBrakeWPF.ViewModels this.AddClosedCaptions = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.UseClosedCaption);
this.ShowAdvancedPassthruOpts = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts);
-
+ this.AddForeignAudioScanTrack = this.userSettingService.GetUserSetting<bool>(UserSettingConstants.AddForeignAudioScanTrack);
// #############################
// Video
@@ -2006,8 +2031,8 @@ namespace HandBrakeWPF.ViewModels this.userSettingService.SetUserSetting(UserSettingConstants.DubModeAudio, this.SelectedAddAudioMode);
this.userSettingService.SetUserSetting(UserSettingConstants.DubModeSubtitle, this.SelectedAddSubtitleMode);
this.userSettingService.SetUserSetting(UserSettingConstants.ShowAdvancedAudioPassthruOpts, this.ShowAdvancedPassthruOpts);
-
-
+ this.userSettingService.SetUserSetting(UserSettingConstants.AddForeignAudioScanTrack, this.AddForeignAudioScanTrack);
+
/* Video */
this.userSettingService.SetUserSetting(UserSettingConstants.EnableQuickSync, this.EnableQuickSync);
this.userSettingService.SetUserSetting(ASUserSettingConstants.DisableQuickSyncDecoding, this.DisableQuickSyncDecoding);
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index feabc08f3..1e8e964e5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -245,6 +245,12 @@ namespace HandBrakeWPF.ViewModels {
this.Task.SubtitleTracks.Clear();
+ // Add Foreign Audio Scan
+ if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AddForeignAudioScanTrack))
+ {
+ this.Add(ForeignAudioSearchTrack);
+ }
+
// New DUB Settings
int mode = this.UserSettingService.GetUserSetting<int>(UserSettingConstants.DubModeSubtitle);
switch (mode)
|