summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-05-22 19:03:53 +0000
committersr55 <[email protected]>2013-05-22 19:03:53 +0000
commitb4439911971a0801b944ad87aee08ea7f3bb8616 (patch)
tree0adfc42576d1a41ae084edf693cce2cbf9487001 /win/CS/HandBrakeWPF/ViewModels
parent58e8804f56c0d7e18c65b12fec16c14dae93ea76 (diff)
WinGui: Make the AutoNaming feature less trigger happy. It should not run for cases where it's not going to change the underlying filename.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5498 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index fb14cd9a1..e3fd2dfc1 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -700,7 +700,11 @@ namespace HandBrakeWPF.ViewModels
if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNaming))
{
- this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);
+ if (this.userSettingService.GetUserSetting<string>(UserSettingConstants.AutoNameFormat) != null &&
+ this.userSettingService.GetUserSetting<string>(UserSettingConstants.AutoNameFormat).Contains(Constants.Title))
+ {
+ this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);
+ }
}
this.NotifyOfPropertyChange(() => this.CurrentTask);
@@ -751,7 +755,11 @@ namespace HandBrakeWPF.ViewModels
if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNaming) && this.ScannedSource.ScanPath != null)
{
- this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);
+ if (this.SelectedPointToPoint == PointToPointMode.Chapters && this.userSettingService.GetUserSetting<string>(UserSettingConstants.AutoNameFormat) != null &&
+ this.userSettingService.GetUserSetting<string>(UserSettingConstants.AutoNameFormat).Contains(Constants.Chapters))
+ {
+ this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);
+ }
}
}
}
@@ -771,7 +779,8 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.SelectedEndPoint);
this.Duration = this.DurationCalculation();
- if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.AutoNaming) && this.ScannedSource.ScanPath != null)
+ if (this.SelectedPointToPoint == PointToPointMode.Chapters && this.userSettingService.GetUserSetting<string>(UserSettingConstants.AutoNameFormat) != null &&
+ this.userSettingService.GetUserSetting<string>(UserSettingConstants.AutoNameFormat).Contains(Constants.Chapters))
{
this.Destination = AutoNameHelper.AutoName(this.CurrentTask, this.SourceName);
}