Add retry extraction context menu, increase error text limit

- Right-click packages with extraction errors shows "Extraktion
  wiederholen" option to manually retry
- Increase WinRAR error text from 240 to 500 chars for better
  diagnostics in logs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Sucukdeluxe
2026-03-02 20:15:00 +01:00
co-authored by Claude Opus 4.6
parent ecf56cb977
commit a22a90adf3
9 changed files with 43 additions and 3 deletions
+21
View File
@@ -2955,6 +2955,27 @@ export class DownloadManager extends EventEmitter {
}
}
public retryExtraction(packageId: string): void {
const pkg = this.session.packages[packageId];
if (!pkg) return;
if (this.packagePostProcessTasks.has(packageId)) return;
const items = pkg.itemIds.map((id) => this.session.items[id]).filter(Boolean) as DownloadItem[];
const completedItems = items.filter((item) => item.status === "completed");
if (completedItems.length === 0) return;
pkg.status = "queued";
pkg.updatedAt = nowMs();
for (const item of completedItems) {
if (!isExtractedLabel(item.fullStatus)) {
item.fullStatus = "Entpacken - Ausstehend";
item.updatedAt = nowMs();
}
}
logger.info(`Extraktion manuell wiederholt: pkg=${pkg.name}`);
this.persistSoon();
this.emitState(true);
void this.runPackagePostProcessing(packageId).catch((err) => logger.warn(`runPackagePostProcessing Fehler (retryExtraction): ${compactErrorText(err)}`));
}
private removePackageFromSession(packageId: string, itemIds: string[]): void {
const postProcessController = this.packagePostProcessAbortControllers.get(packageId);
if (postProcessController && !postProcessController.signal.aborted) {