summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs40
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs3
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml2
4 files changed, 17 insertions, 32 deletions
diff --git a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
index 8be9bcd41..c0ba00633 100644
--- a/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
+++ b/win/CS/HandBrakeWPF/Factories/HBConfigurationFactory.cs
@@ -12,7 +12,6 @@ namespace HandBrakeWPF.Factories
using Caliburn.Micro;
using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Services.Interfaces;
@@ -29,42 +28,27 @@ namespace HandBrakeWPF.Factories
/// <summary>
/// The create.
/// </summary>
- /// <param name="isLoggingEnabled">
- /// The is logging enabled.
- /// </param>
/// <returns>
/// The <see cref="HBConfiguration"/>.
/// </returns>
- public static HBConfiguration Create(bool isLoggingEnabled)
+ public static HBConfiguration Create()
{
HBConfiguration config = new HBConfiguration
{
- IsDvdNavDisabled = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav),
- IsLoggingEnabled = isLoggingEnabled,
- DisableQuickSyncDecoding = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableQuickSyncDecoding),
- EnableDxva = UserSettingService.GetUserSetting<bool>(UserSettingConstants.EnableDxva),
- ScalingMode = UserSettingService.GetUserSetting<VideoScaler>(UserSettingConstants.ScalingMode),
- PreviewScanCount = UserSettingService.GetUserSetting<int>(UserSettingConstants.PreviewScanCount),
- Verbosity = UserSettingService.GetUserSetting<int>(UserSettingConstants.Verbosity),
- MinScanDuration = UserSettingService.GetUserSetting<int>(UserSettingConstants.MinScanDuration),
- ProcessPriority = UserSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority),
- SaveLogToCopyDirectory = UserSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogToCopyDirectory),
- SaveLogWithVideo = UserSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogWithVideo),
- SaveLogCopyDirectory = UserSettingService.GetUserSetting<string>(UserSettingConstants.SaveLogCopyDirectory),
+ IsDvdNavDisabled = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableLibDvdNav),
+ DisableQuickSyncDecoding = UserSettingService.GetUserSetting<bool>(UserSettingConstants.DisableQuickSyncDecoding),
+ EnableDxva = UserSettingService.GetUserSetting<bool>(UserSettingConstants.EnableDxva),
+ ScalingMode = UserSettingService.GetUserSetting<VideoScaler>(UserSettingConstants.ScalingMode),
+ PreviewScanCount = UserSettingService.GetUserSetting<int>(UserSettingConstants.PreviewScanCount),
+ Verbosity = UserSettingService.GetUserSetting<int>(UserSettingConstants.Verbosity),
+ MinScanDuration = UserSettingService.GetUserSetting<int>(UserSettingConstants.MinScanDuration),
+ ProcessPriority = UserSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority),
+ SaveLogToCopyDirectory = UserSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogToCopyDirectory),
+ SaveLogWithVideo = UserSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogWithVideo),
+ SaveLogCopyDirectory = UserSettingService.GetUserSetting<string>(UserSettingConstants.SaveLogCopyDirectory),
};
return config;
}
-
- /// <summary>
- /// The create.
- /// </summary>
- /// <returns>
- /// The <see cref="HBConfiguration"/>.
- /// </returns>
- public static HBConfiguration Create()
- {
- return Create(true);
- }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs
index 693d7a459..f117b9ef5 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs
@@ -302,9 +302,9 @@ namespace HandBrakeWPF.ViewModels
// Setup the encode task as a preview encode
encodeTask.IsPreviewEncode = true;
- encodeTask.PreviewEncodeStartAt = this.StartAt.ToString(CultureInfo.InvariantCulture);
+ encodeTask.PreviewEncodeStartAt = this.StartAt;
encodeTask.PreviewEncodeDuration = this.Duration;
- QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(false));
+ QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create());
ThreadPool.QueueUserWorkItem(this.CreatePreview, task);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
index a910c272b..7f94f5d4c 100644
--- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
@@ -20,6 +20,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Services.Scan.Interfaces;
using HandBrake.Interop.Model.Encoding;
+ using HandBrakeWPF.Factories;
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -250,7 +251,7 @@ namespace HandBrakeWPF.ViewModels
BitmapImage image = null;
try
{
- image = this.scanService.GetPreview(this.Task, this.SelectedPreviewImage);
+ image = this.scanService.GetPreview(this.Task, this.SelectedPreviewImage, HBConfigurationFactory.Create());
}
catch (Exception exc)
{
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index ab2db0dbd..21a3dd59d 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -82,7 +82,7 @@
<Button MinWidth="65"
Margin="0,0,10,0"
- cal:Message.Attach="[Event Click] = [Action ShowAudioDefaults]"
+ cal:Message.Attach="[Event Click] = [Action Clear]"
Content="Clear" />
<Button MinWidth="65"