summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs5
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/LibScan.cs6
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs13
3 files changed, 20 insertions, 4 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs
index be87b3705..e53871d53 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Interfaces/IQueueManager.cs
@@ -69,6 +69,11 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
void ClearCompleted();
/// <summary>
+ /// Clear down all Queue Items
+ /// </summary>
+ void Clear();
+
+ /// <summary>
/// Get the first job on the queue for processing.
/// This also removes the job from the Queue and sets the LastProcessedJob
/// </summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
index 854a561bd..33459a0dd 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs
@@ -161,16 +161,14 @@ namespace HandBrake.ApplicationServices.Services
{
try
{
- // TODO Support Preview Count
-
IsScanning = true;
if (this.ScanStared != null)
this.ScanStared(this, new EventArgs());
if (title != 0)
- instance.StartScan(sourcePath.ToString(), 10, title);
+ instance.StartScan(sourcePath.ToString(), previewCount, title);
else
- instance.StartScan(sourcePath.ToString(), 10);
+ instance.StartScan(sourcePath.ToString(), previewCount);
}
catch (Exception exc)
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
index da8ac5433..e2f81b7c5 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
@@ -198,6 +198,19 @@ namespace HandBrake.ApplicationServices.Services
}
/// <summary>
+ /// Clear down all Queue Items
+ /// </summary>
+ public void Clear()
+ {
+ List<QueueTask> deleteList = this.queue.ToList();
+ foreach (QueueTask item in deleteList)
+ {
+ this.queue.Remove(item);
+ }
+ this.InvokeQueueChanged(EventArgs.Empty);
+ }
+
+ /// <summary>
/// Get the first job on the queue for processing.
/// This also removes the job from the Queue and sets the LastProcessedJob
/// </summary>