summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
index 57033ae9d..c73ad2605 100644
--- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
@@ -104,7 +104,7 @@ namespace HandBrakeWPF.Helpers
/// <param name="errorService">
/// The error Service.
/// </param>
- public static void RecoverQueue(IQueueProcessor encodeQueue, IErrorService errorService)
+ public static bool RecoverQueue(IQueueProcessor encodeQueue, IErrorService errorService)
{
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\");
List<string> queueFiles = CheckQueueRecovery();
@@ -124,6 +124,7 @@ namespace HandBrakeWPF.Helpers
if (result == MessageBoxResult.Yes)
{
+ bool isRecovered = false;
foreach (string file in queueFiles)
{
// Skip over the file if it belongs to another HandBrake instance.
@@ -138,7 +139,8 @@ namespace HandBrakeWPF.Helpers
}
// Recover the Queue
- encodeQueue.RestoreQueue(appDataPath + file);
+ encodeQueue.RestoreQueue(appDataPath + file);
+ isRecovered = true;
// Cleanup
if (!file.Contains(GeneralUtilities.ProcessId.ToString(CultureInfo.InvariantCulture)))
@@ -155,6 +157,8 @@ namespace HandBrakeWPF.Helpers
}
}
}
+
+ return isRecovered;
}
else
{
@@ -177,6 +181,8 @@ namespace HandBrakeWPF.Helpers
File.Delete(Path.Combine(appDataPath, file));
}
}
+
+ return false;
}
}
}