From 9f664e107126dde5b8127a617a87316d68da0578 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 3 May 2020 18:11:47 +0100 Subject: WinGui: Missed files #2814 --- win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs | 5 +---- win/CS/HandBrakeWPF/Services/Queue/QueueService.cs | 9 ++++++--- win/CS/HandBrakeWPF/Services/SystemService.cs | 2 +- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 6 +++--- win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs index 5bf759917..761737434 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueService.cs @@ -206,10 +206,7 @@ namespace HandBrakeWPF.Services.Queue.Interfaces /// Starts encoding the first job in the queue and continues encoding until all jobs /// have been encoded. /// - /// - /// The clear Completed. - /// - void Start(bool clearCompleted); + void Start(); /// /// Stop the current encode and pause the queue. diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs index 41cba661f..94e3ab802 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueService.cs @@ -61,7 +61,6 @@ namespace HandBrakeWPF.Services.Queue private readonly string queueFile; private readonly object queueFileLock = new object(); - private bool clearCompleted; private int allowedInstances; private int jobIdCounter = 0; private bool processIsolationEnabled; @@ -441,7 +440,7 @@ namespace HandBrakeWPF.Services.Queue this.InvokeQueuePaused(EventArgs.Empty); } - public void Start(bool isClearCompleted) + public void Start() { if (this.IsProcessing) { @@ -449,7 +448,6 @@ namespace HandBrakeWPF.Services.Queue } this.IsPaused = false; - this.clearCompleted = isClearCompleted; this.allowedInstances = this.userSettingService.GetUserSetting(UserSettingConstants.SimultaneousEncodes); this.processIsolationEnabled = this.userSettingService.GetUserSetting(UserSettingConstants.ProcessIsolationEnabled); @@ -540,6 +538,11 @@ namespace HandBrakeWPF.Services.Queue return; } + if (this.userSettingService.GetUserSetting(UserSettingConstants.ClearCompletedFromQueue)) + { + this.ClearCompleted(); + } + QueueTask job = this.GetNextJobForProcessing(); if (job != null) { diff --git a/win/CS/HandBrakeWPF/Services/SystemService.cs b/win/CS/HandBrakeWPF/Services/SystemService.cs index e07281b3b..dafd605b3 100644 --- a/win/CS/HandBrakeWPF/Services/SystemService.cs +++ b/win/CS/HandBrakeWPF/Services/SystemService.cs @@ -118,7 +118,7 @@ namespace HandBrakeWPF.Services { if (this.lowPowerPause && this.queueService.IsPaused) { - this.queueService.Start(this.userSettingService.GetUserSetting(UserSettingConstants.ClearCompletedFromQueue)); + this.queueService.Start(); this.ServiceLogMessage(string.Format(Resources.SystemService_ACMains, state.BatteryLifePercent)); } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index c1124817e..741aa2c38 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1113,7 +1113,7 @@ namespace HandBrakeWPF.ViewModels // If the user has enabled --auto-start-queue, start the queue. if (StartupOptions.AutoRestartQueue && !this.queueProcessor.IsProcessing && this.queueProcessor.Count > 0) { - this.queueProcessor.Start(this.userSettingService.GetUserSetting(UserSettingConstants.ClearCompletedFromQueue)); + this.queueProcessor.Start(); } // Preset Selection @@ -1557,7 +1557,7 @@ namespace HandBrakeWPF.ViewModels if (this.queueProcessor.Count != 0 || this.queueProcessor.IsPaused) { this.NotifyOfPropertyChange(() => this.IsEncoding); - this.queueProcessor.Start(this.userSettingService.GetUserSetting(UserSettingConstants.ClearCompletedFromQueue)); + this.queueProcessor.Start(); return; } @@ -1573,7 +1573,7 @@ namespace HandBrakeWPF.ViewModels if (addError == null) { this.NotifyOfPropertyChange(() => this.IsEncoding); - this.queueProcessor.Start(this.userSettingService.GetUserSetting(UserSettingConstants.ClearCompletedFromQueue)); + this.queueProcessor.Start(); } else { diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 2926e40e5..67e0c3804 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -333,7 +333,7 @@ namespace HandBrakeWPF.ViewModels this.JobsPending = string.Format(Resources.QueueViewModel_JobsPending, this.queueProcessor.Count); this.IsQueueRunning = true; - this.queueProcessor.Start(userSettingService.GetUserSetting(UserSettingConstants.ClearCompletedFromQueue)); + this.queueProcessor.Start(); } public void ExportCli() -- cgit v1.2.3