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:
@@ -44,4 +44,31 @@ describe("live settings overlay", () => {
|
||||
expect(Object.keys(target.debridAccountStatuses).sort()).toEqual([keepKeyId, keepMegaId].sort());
|
||||
expect(target.totalRuntimeAllTimeMs).toBe(9_000);
|
||||
});
|
||||
|
||||
it("keeps the Real-Debrid service status while the browser account remains configured", () => {
|
||||
const target = {
|
||||
...defaultSettings(),
|
||||
realDebridUseWebLogin: true
|
||||
};
|
||||
const live = {
|
||||
...target,
|
||||
debridAccountStatuses: {
|
||||
"svc-realdebrid": {
|
||||
accountId: "svc-realdebrid",
|
||||
provider: "realdebrid" as const,
|
||||
label: "Real-Debrid",
|
||||
maskedLogin: "Browser-Login",
|
||||
valid: true,
|
||||
isPremium: true,
|
||||
premiumUntilMs: null,
|
||||
message: "Premium aktiv",
|
||||
checkedAt: 1
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
overlayLiveUsageCounters(target, live, 9_000);
|
||||
|
||||
expect(target.debridAccountStatuses["svc-realdebrid"]).toEqual(live.debridAccountStatuses["svc-realdebrid"]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user