summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-11-19 21:55:44 +0000
committersr55 <[email protected]>2013-11-19 21:55:44 +0000
commitf83ab26ab8e1d2ce277f0c12f23b5753bf63d763 (patch)
treef59a860b5a06effcdccc57dfa83629d171536864 /win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
parentca8fe7c1fe8abf869d4c53e31124c5f0b1aa8dfa (diff)
WinGui: Started work on API improvements in the Application services dll. Removing the concept of user settings and replacing it with a Configuration object.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5896 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/LibScan.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 7064cc643..6a372f228 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -15,6 +15,7 @@ namespace HandBrake.ApplicationServices.Services
using System.Text;
using HandBrake.ApplicationServices.EventArgs;
+ using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
@@ -175,7 +176,10 @@ namespace HandBrake.ApplicationServices.Services
/// <param name="postAction">
/// The post Action.
/// </param>
- public void Scan(string sourcePath, int title, int previewCount, Action<bool> postAction)
+ /// <param name="configuraiton">
+ /// The configuraiton.
+ /// </param>
+ public void Scan(string sourcePath, int title, int previewCount, Action<bool> postAction, HBConfiguration configuraiton)
{
// Try to cleanup any previous scan instances.
if (instance != null)
@@ -223,7 +227,7 @@ namespace HandBrake.ApplicationServices.Services
instance.ScanCompleted += this.InstanceScanCompleted;
// Start the scan on a back
- this.ScanSource(sourcePath, title, previewCount);
+ this.ScanSource(sourcePath, title, previewCount, configuraiton);
}
/// <summary>
@@ -263,7 +267,10 @@ namespace HandBrake.ApplicationServices.Services
/// <param name="previewCount">
/// The preview Count.
/// </param>
- private void ScanSource(object sourcePath, int title, int previewCount)
+ /// <param name="configuraiton">
+ /// The configuraiton.
+ /// </param>
+ private void ScanSource(object sourcePath, int title, int previewCount, HBConfiguration configuraiton)
{
try
{
@@ -281,7 +288,7 @@ namespace HandBrake.ApplicationServices.Services
TimeSpan.FromSeconds(
this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.MinScanDuration));
- HandBrakeUtils.SetDvdNav(!this.userSettingService.GetUserSetting<bool>(ASUserSettingConstants.DisableLibDvdNav));
+ HandBrakeUtils.SetDvdNav(!configuraiton.IsDvdNavDisabled);
this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0);
}