{\r
foreach (string file in queueFiles)\r
{\r
- encodeQueue.RestoreQueue(appDataPath + file); // Start Recovery\r
+ // Skip over the file if it belongs to another HandBrake instance.\r
+ Match m = Regex.Match(file, @"([0-9]+).xml");\r
+ if (m.Success)\r
+ {\r
+ int processId = int.Parse(m.Groups[1].ToString());\r
+ if (processId != GeneralUtilities.ProcessId && GeneralUtilities.IsPidACurrentHandBrakeInstance(processId))\r
+ {\r
+ continue;\r
+ }\r
+ }\r
+\r
+ // Recover the Queue\r
+ encodeQueue.RestoreQueue(appDataPath + file); \r
+\r
+ // Cleanup\r
if (!file.Contains(GeneralUtilities.ProcessId.ToString(CultureInfo.InvariantCulture)))\r
{\r
try\r