diff options
author | sr55 <[email protected]> | 2016-04-23 17:33:38 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2016-04-23 17:33:38 +0100 |
commit | 59853dd5e1f2b504167340fa11c79febe18b8f34 (patch) | |
tree | 598875905e7065207bebefde6860bd76c9b101c4 /win/CS/HandBrakeWPF/ViewModels | |
parent | 4d23e1dff4bb63575e586a8da8793891fa67bad4 (diff) |
WinGui: If you invoke HandBrake.exe with "--auto-start-queue" it will automatically start the queue and not prompt to recover the queue.
Behaviour Change: When reloading the queue, any job that is "In progress" will be marked as "Error" now. We don't know if HandBrake crashed or the system restarted. This avoids any crash -> restart loops that may occur. This allows HandBrake to get on with the rest of the queue until the user can action the failed encode.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 3f9bc7201..89736dc7b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -23,9 +23,6 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
using HandBrake.ApplicationServices.Interop;
- using HandBrake.ApplicationServices.Interop.HbLib;
- using HandBrake.ApplicationServices.Services.Logging;
- using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Commands;
using HandBrakeWPF.Commands.Menu;
@@ -48,6 +45,7 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Services.Scan.EventArgs;
using HandBrakeWPF.Services.Scan.Interfaces;
using HandBrakeWPF.Services.Scan.Model;
+ using HandBrakeWPF.Startup;
using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
using HandBrakeWPF.Views;
@@ -58,7 +56,6 @@ namespace HandBrakeWPF.ViewModels using Action = System.Action;
using Execute = Caliburn.Micro.Execute;
- using ILog = HandBrake.ApplicationServices.Services.Logging.Interfaces.ILog;
using LogManager = HandBrakeWPF.Helpers.LogManager;
/// <summary>
@@ -1209,7 +1206,7 @@ namespace HandBrakeWPF.ViewModels this.presetService.Load();
// Queue Recovery
- bool queueRecovered = QueueRecoveryHelper.RecoverQueue(this.queueProcessor, this.errorService);
+ bool queueRecovered = QueueRecoveryHelper.RecoverQueue(this.queueProcessor, this.errorService, StartupOptions.AutoRestartQueue);
// If the queue is not recovered, show the source selection window by default.
if (!queueRecovered)
@@ -1221,6 +1218,12 @@ namespace HandBrakeWPF.ViewModels this.HasSource = true; // Enable the GUI. Needed for in-line queue.
}
+ // 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<bool>(UserSettingConstants.ClearCompletedFromQueue));
+ }
+
this.SelectedPreset = this.presetService.DefaultPreset;
// Log Cleaning
|