/// <param name="errorService">\r
/// The error Service.\r
/// </param>\r
- public static void RecoverQueue(IQueueProcessor encodeQueue, IErrorService errorService)\r
+ public static bool RecoverQueue(IQueueProcessor encodeQueue, IErrorService errorService)\r
{\r
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\");\r
List<string> queueFiles = CheckQueueRecovery();\r
\r
if (result == MessageBoxResult.Yes)\r
{\r
+ bool isRecovered = false;\r
foreach (string file in queueFiles)\r
{\r
// Skip over the file if it belongs to another HandBrake instance.\r
}\r
\r
// Recover the Queue\r
- encodeQueue.RestoreQueue(appDataPath + file); \r
+ encodeQueue.RestoreQueue(appDataPath + file);\r
+ isRecovered = true;\r
\r
// Cleanup\r
if (!file.Contains(GeneralUtilities.ProcessId.ToString(CultureInfo.InvariantCulture)))\r
}\r
}\r
}\r
+\r
+ return isRecovered;\r
}\r
else\r
{\r
File.Delete(Path.Combine(appDataPath, file));\r
}\r
}\r
+\r
+ return false;\r
}\r
}\r
}\r
this.presetService.Load();\r
\r
// Queue Recovery\r
- QueueRecoveryHelper.RecoverQueue(this.queueProcessor, this.errorService);\r
+ bool isRecovered = QueueRecoveryHelper.RecoverQueue(this.queueProcessor, this.errorService);\r
+ if (isRecovered)\r
+ {\r
+ this.HasSource = true;\r
+ }\r
\r
this.SelectedPreset = this.presetService.DefaultPreset;\r
\r