mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
chore: removing qs
This commit is contained in:
parent
b1c7191ef6
commit
9d159dcf95
4 changed files with 35 additions and 22 deletions
|
@ -2,7 +2,6 @@ import { Repack } from "@main/entity";
|
|||
import { savePage } from "./helpers";
|
||||
import type { GameRepackInput } from "./helpers";
|
||||
import { logger } from "../logger";
|
||||
import { stringify } from "qs";
|
||||
import parseTorrent, {
|
||||
toMagnetURI,
|
||||
Instance as TorrentInstance,
|
||||
|
@ -58,8 +57,12 @@ export const getNewRepacksFromOnlineFix = async (
|
|||
|
||||
if (!preLogin.field || !preLogin.value) return;
|
||||
|
||||
const tokenField = preLogin.field;
|
||||
const tokenValue = preLogin.value;
|
||||
const params = new URLSearchParams({
|
||||
login_name: process.env.ONLINEFIX_USERNAME,
|
||||
login_password: process.env.ONLINEFIX_PASSWORD,
|
||||
login: "submit",
|
||||
[preLogin.field]: preLogin.value,
|
||||
});
|
||||
|
||||
await http
|
||||
.post("https://online-fix.me/", {
|
||||
|
@ -69,12 +72,7 @@ export const getNewRepacksFromOnlineFix = async (
|
|||
Origin: "https://online-fix.me",
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
body: stringify({
|
||||
login_name: process.env.ONLINEFIX_USERNAME,
|
||||
login_password: process.env.ONLINEFIX_PASSWORD,
|
||||
login: "submit",
|
||||
[tokenField]: tokenValue,
|
||||
}),
|
||||
body: params.toString(),
|
||||
})
|
||||
.text();
|
||||
}
|
||||
|
|
|
@ -42,8 +42,6 @@ const getXatabRepack = async (url: string) => {
|
|||
if (!$downloadButton) throw new Error("Download button not found");
|
||||
|
||||
const torrentBuffer = await getTorrentBuffer($downloadButton.href);
|
||||
console.log(url);
|
||||
console.log(torrentBuffer.byteLength);
|
||||
|
||||
return {
|
||||
fileSize: formatXatabDownloadSize($size.textContent).toUpperCase(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue