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/Helpers/QueueRecoveryHelper.cs | |
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/Helpers/QueueRecoveryHelper.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs index 1cbc352f3..90e3ab0ac 100644 --- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs @@ -122,22 +122,35 @@ namespace HandBrakeWPF.Helpers /// <returns>
/// The <see cref="bool"/>.
/// </returns>
- public static bool RecoverQueue(IQueueProcessor encodeQueue, IErrorService errorService)
+ public static bool RecoverQueue(IQueueProcessor encodeQueue, IErrorService errorService, bool silentRecovery)
{
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\");
List<string> queueFiles = CheckQueueRecovery();
MessageBoxResult result = MessageBoxResult.None;
- if (queueFiles.Count == 1)
+ if (!silentRecovery)
{
- result = errorService.ShowMessageBox(
- "HandBrake has detected unfinished items on the queue from the last time the application was launched. Would you like to recover these?",
- "Queue Recovery Possible", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ if (queueFiles.Count == 1)
+ {
+ result =
+ errorService.ShowMessageBox(
+ "HandBrake has detected unfinished items on the queue from the last time the application was launched. Would you like to recover these?",
+ "Queue Recovery Possible",
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+ }
+ else if (queueFiles.Count > 1)
+ {
+ result =
+ errorService.ShowMessageBox(
+ "HandBrake has detected multiple unfinished queue files. These will be from multiple instances of HandBrake running. Would you like to recover all unfinished jobs?",
+ "Queue Recovery Possible",
+ MessageBoxButton.YesNo,
+ MessageBoxImage.Question);
+ }
}
- else if (queueFiles.Count > 1)
+ else
{
- result = MessageBox.Show(
- "HandBrake has detected multiple unfinished queue files. These will be from multiple instances of HandBrake running. Would you like to recover all unfinished jobs?",
- "Queue Recovery Possible", MessageBoxButton.YesNo, MessageBoxImage.Question);
+ result = MessageBoxResult.Yes;
}
if (result == MessageBoxResult.Yes)
|