fix: strengthen live recovery and support diagnostics
Apply account and key changes to active queues without a restart and isolate provider attempt cancellation so fallback accounts remain usable. Preserve pause ownership, bound persisted HTTP 416 recovery, reconcile resets with authoritative state, and stabilize package ordering and live update cadence. Correlate rotation, conversion, resume, disk, queue-control, clipboard, and support-export events while redacting sensitive data at every persistent boundary and again in generated bundles. Release as v2.0.31 with updated English documentation and regression coverage.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
buildAccountToggleSettingsUpdate,
|
||||
SerialTaskQueue,
|
||||
setAccountTargetEnabled,
|
||||
type AccountToggleTarget
|
||||
@@ -47,6 +48,8 @@ describe("account toggle queue", () => {
|
||||
let settings = {
|
||||
disabledProviders: [],
|
||||
debridLinkDisabledKeyIds: [],
|
||||
megaDebridApiEnabled: false,
|
||||
megaDebridWebEnabled: true,
|
||||
megaDebridApiDisabledAccountIds: [],
|
||||
megaDebridWebDisabledAccountIds: [...accountIds],
|
||||
megaDebridDisabledAccountIds: [...accountIds]
|
||||
@@ -60,4 +63,25 @@ describe("account toggle queue", () => {
|
||||
expect(settings.megaDebridWebDisabledAccountIds).toEqual([]);
|
||||
expect(settings.megaDebridDisabledAccountIds).toEqual([]);
|
||||
});
|
||||
|
||||
it("reactivates a disabled Mega-Debrid mode when one of its accounts is enabled", () => {
|
||||
const settings = {
|
||||
disabledProviders: [],
|
||||
debridLinkDisabledKeyIds: [],
|
||||
megaDebridApiEnabled: false,
|
||||
megaDebridWebEnabled: false,
|
||||
megaDebridApiDisabledAccountIds: ["api-1"],
|
||||
megaDebridWebDisabledAccountIds: ["web-1"],
|
||||
megaDebridDisabledAccountIds: ["api-1", "web-1"]
|
||||
};
|
||||
|
||||
const next = setAccountTargetEnabled(settings, { kind: "mega-web", accountId: "web-1" }, true);
|
||||
const update = buildAccountToggleSettingsUpdate(next);
|
||||
|
||||
expect(next.megaDebridWebEnabled).toBe(true);
|
||||
expect(next.megaDebridApiEnabled).toBe(false);
|
||||
expect(update.megaDebridWebEnabled).toBe(true);
|
||||
expect(update.megaDebridApiEnabled).toBe(false);
|
||||
expect(update.megaDebridWebDisabledAccountIds).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user