Fix provider order/routing respecting on restart, schedule timer on manual start

- Clear item.provider on stop/restart so provider order/routing changes
  are respected on next download attempt
- Reset item.provider for all non-completed items when providerOrder or
  hosterRouting changes in settings
- Cancel scheduled-start timer when queue is started manually
- Track disk-fallback hybrid-extract archives per session to prevent
  infinite post-processing loop

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-06 23:52:09 +01:00
co-authored by Claude Sonnet 4.6
parent 9dd5d4eef8
commit 9d374b97cf
2 changed files with 63 additions and 1 deletions
+9 -1
View File
@@ -315,7 +315,15 @@ function registerIpcHandlers(): void {
return controller.resolveStartConflict(packageId, policy);
});
ipcMain.handle(IPC_CHANNELS.CLEAR_ALL, () => controller.clearAll());
ipcMain.handle(IPC_CHANNELS.START, () => controller.start());
ipcMain.handle(IPC_CHANNELS.START, () => {
// Cancel any pending scheduled start when the user starts manually
if (scheduledStartTimer !== null) {
clearTimeout(scheduledStartTimer);
scheduledStartTimer = null;
controller.updateSettings({ scheduledStartEpochMs: 0 });
}
return controller.start();
});
ipcMain.handle(IPC_CHANNELS.START_PACKAGES, (_event: IpcMainInvokeEvent, packageIds: string[]) => {
validateStringArray(packageIds ?? [], "packageIds");
return controller.startPackages(packageIds ?? []);