fix(realdebrid): persist web status and report relevant provider errors

Check Real-Debrid API and browser sessions through the account status flow, retain the service status across settings updates, and refresh the account row when a browser login is detected. Exclude unavailable providers that were never attempted from conversion failures and prevent aggregated fallback text from being mislabeled as a Debrid-Link terminal error. Bump the development version to 2.0.37 and add focused regression coverage.
This commit is contained in:
Sucukdeluxe
2026-08-14 21:02:30 +02:00
parent c2d5dbaeb3
commit b80209a10f
20 changed files with 556 additions and 81 deletions
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
import { parseDebridLinkTerminalFailure } from "../src/main/download-manager";
describe("provider error classification", () => {
it("does not relabel an aggregated Real-Debrid failure as Debrid-Link", () => {
const message = "Error: Unrestrict fehlgeschlagen: Mega-Debrid nicht verfuegbar (alle aktiven Accounts deaktiviert oder ausgeschopft) | Debrid-Link nicht verfuegbar (alle aktiven API-Keys deaktiviert oder ausgeschopft) | Real-Debrid: traffic_exhausted";
expect(parseDebridLinkTerminalFailure(message)).toBeNull();
});
it("still recognizes a direct Debrid-Link terminal failure", () => {
expect(parseDebridLinkTerminalFailure("Debrid-Link nicht verfuegbar: kein aktiver API-Key")).toMatchObject({
kind: "no_active_key"
});
});
});