feat(settings): expose Real-Debrid multi-account controls

This commit is contained in:
Sucukdeluxe
2026-08-15 21:34:28 +02:00
parent 7e65195057
commit d720c5912e
15 changed files with 316 additions and 61 deletions
+15 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { buildAccountCreateCommand, createAccountDialogState } from "../src/renderer/App";
import { buildAccountCreateCommand, buildRealDebridWebCreateLoginRequest, createAccountDialogState } from "../src/renderer/App";
import { createRendererSettings } from "../src/main/renderer-state";
import { defaultSettings } from "../src/main/constants";
@@ -27,4 +27,18 @@ describe("account creation dialog", () => {
expect(dialog.password).toBe("");
expect(dialog.megaAccounts).toEqual([]);
});
it("forwards the selected daily limit with a newly reserved Real-Debrid Web account", () => {
const settings = createRendererSettings(defaultSettings());
const dialog = {
...createAccountDialogState("create", "realdebrid-web", settings),
dailyLimitGb: "2,5"
};
expect(buildRealDebridWebCreateLoginRequest(dialog, "rdw_reservedopaqueid")).toEqual({
accountId: "rdw_reservedopaqueid",
create: true,
dailyLimitBytes: Math.floor(2.5 * 1024 * 1024 * 1024)
});
});
});