release: harden provider rotation and download recovery

Apply account and provider changes to active conversions without restarting, isolate API and Web state, and abort the exact fallback attempt when settings change.

Bound resume recovery, make disk reservations abortable, preserve cleanup totals and history, stabilize compact UI state, and canonicalize RapidGator host aliases.

Expand bounded support diagnostics while redacting account identities, local paths, package names, and file names from current and rotated logs.

Add regression coverage for rotation, live settings, HTTP 416 recovery, disk waits, cleanup, context menus, history failures, and support bundle privacy.
This commit is contained in:
Sucukdeluxe
2026-08-13 20:44:43 +02:00
parent d287056a2a
commit 4972858c9d
34 changed files with 2103 additions and 317 deletions
+50
View File
@@ -128,4 +128,54 @@ describe("renderer state serialization", () => {
expect(serialized).not.toContain(secret);
}
});
it("assigns mode-specific statuses to API and Web rows with the same Mega-Debrid login", () => {
const login = "shared-status@example.test";
const baseId = getMegaDebridAccountId(login);
const apiStatus = {
accountId: `${baseId}:api`,
provider: "megadebrid" as const,
label: "Account 1",
maskedLogin: "sh***st",
valid: true,
isPremium: true,
premiumUntilMs: 2_000,
message: "API valid",
checkedAt: 1
};
const webStatus = {
accountId: `${baseId}:web`,
provider: "megadebrid" as const,
label: "Account 1",
maskedLogin: "sh***st",
valid: false,
isPremium: false,
premiumUntilMs: null,
message: "Web rejected",
checkedAt: 1
};
const state = createRendererState({
...defaultSettings(),
megaCredentials: `${login}:api-pass`,
megaDebridApiCredentials: `${login}:api-pass`,
megaDebridWebCredentials: `${login}:web-pass`,
megaDebridApiEnabled: true,
megaDebridWebEnabled: true,
debridAccountStatuses: {
[apiStatus.accountId]: apiStatus,
[webStatus.accountId]: webStatus
}
});
expect(state.accounts.find((account) => account.kind === "megadebrid-api")?.status).toMatchObject({
accountId: `${baseId}:api`,
valid: true,
message: "API valid"
});
expect(state.accounts.find((account) => account.kind === "megadebrid-web")?.status).toMatchObject({
accountId: `${baseId}:web`,
valid: false,
message: "Web rejected"
});
});
});