release: rebuild AllDebrid integration for v2.0.66
Replace the legacy cookie and reCAPTCHA scraper with AllDebrid's official browser PIN authorization and API-key flow. Persist verified account identity and premium status, include AllDebrid in direct and bulk checks, and migrate stale web-only configurations to reauthorization. Remove the unconditional three-second scheduler delay while retaining provider-reported slot limits. Preserve official error codes and terminate unavailable-link, unsupported-link, authentication, IP, and server restriction failures without retries or provider cooldowns.
This commit is contained in:
@@ -141,10 +141,15 @@ describe("write-only account commands", () => {
|
||||
expect(() => api.validateAccountSecretRequest?.({ kind: "realdebrid-api", accountId: "svc-realdebrid", secret: "not-allowed" })).toThrow(/ungültig/i);
|
||||
});
|
||||
|
||||
it.each(["realdebrid-api", "realdebrid-web"] as const)("accepts %s credential checks at the IPC boundary", (kind) => {
|
||||
expect(validateAccountCredentialCheckInput({ kind, accountId: "svc-realdebrid" })).toEqual({
|
||||
it.each([
|
||||
["realdebrid-api", "svc-realdebrid"],
|
||||
["realdebrid-web", "svc-realdebrid"],
|
||||
["alldebrid-api", "svc-alldebrid"],
|
||||
["alldebrid-web", "svc-alldebrid"]
|
||||
] as const)("accepts %s credential checks at the IPC boundary", (kind, accountId) => {
|
||||
expect(validateAccountCredentialCheckInput({ kind, accountId })).toEqual({
|
||||
kind,
|
||||
accountId: "svc-realdebrid",
|
||||
accountId,
|
||||
identity: undefined,
|
||||
secret: undefined
|
||||
});
|
||||
@@ -265,6 +270,26 @@ describe("write-only account commands", () => {
|
||||
expect(JSON.stringify(replaced.response)).not.toContain(secret);
|
||||
});
|
||||
|
||||
it("keeps the PIN-issued AllDebrid API key when editing the browser-authorized account", () => {
|
||||
const apiKey = "fixture-all-pin-api-key";
|
||||
const settings = {
|
||||
...defaultSettings(),
|
||||
allDebridUseWebLogin: true,
|
||||
allDebridToken: apiKey
|
||||
};
|
||||
|
||||
const replaced = applyAccountCommand(settings, validateAccountCommand({
|
||||
action: "replace",
|
||||
kind: "alldebrid-web",
|
||||
accountId: "svc-alldebrid",
|
||||
secret: "",
|
||||
dailyLimitBytes: 2 * GIB
|
||||
}));
|
||||
|
||||
expect(replaced.settings.allDebridUseWebLogin).toBe(true);
|
||||
expect(replaced.settings.allDebridToken).toBe(apiKey);
|
||||
});
|
||||
|
||||
it("replaces a Mega-Debrid account while preserving sibling accounts and mode-specific state", () => {
|
||||
const firstId = getMegaDebridAccountId("first@example.test");
|
||||
const oldId = getMegaDebridAccountId("second@example.test");
|
||||
|
||||
Reference in New Issue
Block a user