mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-12 11:12:07 +00:00
Create a downloader for the gamedrivers bypass
This commit is contained in:
parent
b4014535e8
commit
6da648b21c
4 changed files with 13 additions and 0 deletions
|
@ -260,6 +260,16 @@ export class DownloadManager {
|
||||||
case Downloader.PixelDrain: {
|
case Downloader.PixelDrain: {
|
||||||
const id = game.uri!.split("/").pop();
|
const id = game.uri!.split("/").pop();
|
||||||
|
|
||||||
|
return {
|
||||||
|
action: "start",
|
||||||
|
game_id: game.id,
|
||||||
|
url: `https://pixeldrain.com/api/file/${id}?download`,
|
||||||
|
save_path: game.downloadPath!,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
case Downloader.GameDrive: {
|
||||||
|
const id = game.uri!.split("/").pop();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
action: "start",
|
action: "start",
|
||||||
game_id: game.id,
|
game_id: game.id,
|
||||||
|
|
|
@ -9,6 +9,7 @@ export const DOWNLOADER_NAME = {
|
||||||
[Downloader.PixelDrain]: "PixelDrain",
|
[Downloader.PixelDrain]: "PixelDrain",
|
||||||
[Downloader.Qiwi]: "Qiwi",
|
[Downloader.Qiwi]: "Qiwi",
|
||||||
[Downloader.Datanodes]: "Datanodes",
|
[Downloader.Datanodes]: "Datanodes",
|
||||||
|
[Downloader.GameDrive]: "GameDrive",
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MAX_MINUTES_TO_SHOW_IN_PLAYTIME = 120;
|
export const MAX_MINUTES_TO_SHOW_IN_PLAYTIME = 120;
|
||||||
|
|
|
@ -5,6 +5,7 @@ export enum Downloader {
|
||||||
PixelDrain,
|
PixelDrain,
|
||||||
Qiwi,
|
Qiwi,
|
||||||
Datanodes,
|
Datanodes,
|
||||||
|
GameDrive,
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum DownloadSourceStatus {
|
export enum DownloadSourceStatus {
|
||||||
|
|
|
@ -88,6 +88,7 @@ export const getDownloadersForUri = (uri: string) => {
|
||||||
if (uri.startsWith("https://pixeldrain.com")) return [Downloader.PixelDrain];
|
if (uri.startsWith("https://pixeldrain.com")) return [Downloader.PixelDrain];
|
||||||
if (uri.startsWith("https://qiwi.gg")) return [Downloader.Qiwi];
|
if (uri.startsWith("https://qiwi.gg")) return [Downloader.Qiwi];
|
||||||
if (uri.startsWith("https://datanodes.to")) return [Downloader.Datanodes];
|
if (uri.startsWith("https://datanodes.to")) return [Downloader.Datanodes];
|
||||||
|
if (uri.startsWith("https://pd.cybar.xyz")) return [Downloader.GameDrive];
|
||||||
|
|
||||||
if (realDebridHosts.some((host) => uri.startsWith(host)))
|
if (realDebridHosts.some((host) => uri.startsWith(host)))
|
||||||
return [Downloader.RealDebrid];
|
return [Downloader.RealDebrid];
|
||||||
|
|
Loading…
Reference in a new issue