mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-10 21:36:17 +00:00
Merge branch 'main' into fix/downloads-ui
This commit is contained in:
@@ -33,9 +33,7 @@ export const loadState = async () => {
|
||||
|
||||
await import("./events");
|
||||
|
||||
if (process.platform !== "darwin") {
|
||||
Aria2.spawn();
|
||||
}
|
||||
|
||||
if (userPreferences?.realDebridApiToken) {
|
||||
RealDebridClient.authorize(userPreferences.realDebridApiToken);
|
||||
|
||||
@@ -7,7 +7,10 @@ export class Aria2 {
|
||||
private static process: cp.ChildProcess | null = null;
|
||||
|
||||
public static spawn() {
|
||||
const binaryPath = app.isPackaged
|
||||
const binaryPath =
|
||||
process.platform === "darwin"
|
||||
? "aria2c"
|
||||
: app.isPackaged
|
||||
? path.join(process.resourcesPath, "aria2c")
|
||||
: path.join(__dirname, "..", "..", "binaries", "aria2c");
|
||||
|
||||
|
||||
@@ -36,16 +36,13 @@ export class GofileApi {
|
||||
}
|
||||
|
||||
public static async getDownloadLink(id: string) {
|
||||
const searchParams = new URLSearchParams({
|
||||
wt: WT,
|
||||
});
|
||||
|
||||
const response = await axios.get<{
|
||||
status: string;
|
||||
data: GofileContentsResponse;
|
||||
}>(`https://api.gofile.io/contents/${id}?${searchParams.toString()}`, {
|
||||
}>(`https://api.gofile.io/contents/${id}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.token}`,
|
||||
"X-Website-Token": WT,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user