Create a downloader for the gamedrivers bypass

This commit is contained in:
Shisuys 2025-01-26 10:41:08 -03:00
parent b4014535e8
commit 6da648b21c
4 changed files with 13 additions and 0 deletions

View file

@ -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,

View file

@ -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;

View file

@ -5,6 +5,7 @@ export enum Downloader {
PixelDrain, PixelDrain,
Qiwi, Qiwi,
Datanodes, Datanodes,
GameDrive,
} }
export enum DownloadSourceStatus { export enum DownloadSourceStatus {

View file

@ -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];