feat(collector): rebuild link preview as package workspace

Inspect pasted links, text files and DLC containers before queue insertion and resolve supported hoster metadata without starting downloads. Group multipart files into expandable packages with size, status, availability, timestamps, filtering and stable selection. Add selected or complete transfer to Downloads while retaining entries on failed or partial handoff. Keep collector toolbar spacing consistent and show the full 1Fichier identity with its provider icon in Downloads.
This commit is contained in:
Sucukdeluxe
2026-08-22 02:22:42 +02:00
parent 5f391a35d6
commit 40428a69b4
27 changed files with 1265 additions and 1229 deletions
+16 -5
View File
@@ -44,7 +44,9 @@ import type { RealDebridLoginRequest } from "../shared/preload-api";
import { applyAccountCommand, resolveStoredAccountSecret } from "./account-commands";
import { collectAccountStatusRedactionValues, sanitizeDebridAccountStatus, sanitizeDebridAccountStatuses } from "./account-status-sanitizer";
import { createRendererState } from "./renderer-state";
import { parseCollectorInput } from "./link-parser";
import { parseCollectorInput } from "./link-parser";
import { inspectCollectorPackages, inspectCollectorText } from "./collector-inspection";
import type { CollectorInspectionRequest, CollectorInspectionResult } from "../shared/collector";
import { configureLogger, flushLoggerSync, getLogFilePath, logger } from "./logger";
import { AllDebridWebFallback } from "./all-debrid-web";
import { BestDebridWebFallback } from "./bestdebrid-web";
@@ -909,7 +911,7 @@ export class AppController {
return result;
}
public addLinks(payload: AddLinksPayload): { addedPackages: number; addedLinks: number; invalidCount: number } {
public addLinks(payload: AddLinksPayload): { addedPackages: number; addedLinks: number; invalidCount: number } {
const parsed = parseCollectorInput(payload.rawText, payload.packageName || this.settings.packageName);
if (parsed.length === 0) {
this.audit("WARN", "Links hinzufügen ohne gültigen Inhalt", {
@@ -924,9 +926,18 @@ export class AppController {
requestedPackages: parsed.length
});
return { ...result, invalidCount: 0 };
}
public async addContainers(filePaths: string[]): Promise<{ addedPackages: number; addedLinks: number }> {
}
public inspectCollectorText(request: CollectorInspectionRequest): Promise<CollectorInspectionResult> {
return inspectCollectorText(request, this.settings);
}
public async inspectCollectorContainers(filePaths: string[], addedAt: number): Promise<CollectorInspectionResult> {
const packages = await importDlcContainers(filePaths);
return inspectCollectorPackages(packages, this.settings, addedAt, {}, true);
}
public async addContainers(filePaths: string[]): Promise<{ addedPackages: number; addedLinks: number }> {
const packages = await importDlcContainers(filePaths);
const merged: ParsedPackageInput[] = packages.map((pkg) => ({
name: pkg.name,