From 50a2185ad7e6cb7c830175db1d7a66f74c112742 Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 12 May 2024 13:34:06 +0100 Subject: [PATCH] fix: removing decompression --- .../downloaders/real-debrid.downloader.ts | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/main/services/downloaders/real-debrid.downloader.ts b/src/main/services/downloaders/real-debrid.downloader.ts index 4c8e2691..8a44f934 100644 --- a/src/main/services/downloaders/real-debrid.downloader.ts +++ b/src/main/services/downloaders/real-debrid.downloader.ts @@ -4,7 +4,7 @@ import path from "node:path"; import fs from "node:fs"; import EasyDL from "easydl"; import { GameStatus } from "@shared"; -import { fullArchive } from "node-7z-archive"; +// import { fullArchive } from "node-7z-archive"; import { Downloader } from "./downloader"; import { RealDebridClient } from "../real-debrid"; @@ -29,19 +29,19 @@ export class RealDebridDownloader extends Downloader { } } - private static async startDecompression( - rarFile: string, - dest: string, - game: Game - ) { - await fullArchive(rarFile, dest); + // private static async startDecompression( + // rarFile: string, + // dest: string, + // game: Game + // ) { + // await fullArchive(rarFile, dest); - const updatePayload: QueryDeepPartialEntity = { - status: GameStatus.Finished, - }; + // const updatePayload: QueryDeepPartialEntity = { + // status: GameStatus.Finished, + // }; - await this.updateGameProgress(game.id, updatePayload, {}); - } + // await this.updateGameProgress(game.id, updatePayload, {}); + // } static destroy() { if (this.download) { @@ -96,7 +96,7 @@ export class RealDebridDownloader extends Downloader { this.download.on("end", async () => { const updatePayload: QueryDeepPartialEntity = { - status: GameStatus.Decompressing, + status: GameStatus.Finished, progress: 1, }; @@ -104,11 +104,12 @@ export class RealDebridDownloader extends Downloader { timeRemaining: 0, }); - this.startDecompression( - path.join(downloadPath, filename), - downloadPath, - game - ); + /* This has to be improved */ + // this.startDecompression( + // path.join(downloadPath, filename), + // downloadPath, + // game + // ); }); } }