diff --git a/src/main/events/library/extract-game-download.ts b/src/main/events/library/extract-game-download.ts index bcc7052c..8fb24b81 100644 --- a/src/main/events/library/extract-game-download.ts +++ b/src/main/events/library/extract-game-download.ts @@ -1,7 +1,7 @@ import { registerEvent } from "../register-event"; import { GameShop } from "@types"; import path from "node:path"; -import { _7Zip, GameFilesManager } from "@main/services"; +import { GameFilesManager } from "@main/services"; import { downloadsSublevel, gamesSublevel, levelKeys } from "@main/level"; import { FILE_EXTENSIONS_TO_EXTRACT } from "@shared"; diff --git a/src/main/services/7zip.ts b/src/main/services/7zip.ts index cc057637..57987f90 100644 --- a/src/main/services/7zip.ts +++ b/src/main/services/7zip.ts @@ -9,7 +9,7 @@ export const binaryName = { win32: "7z.exe", }; -export class _7Zip { +export class SevenZip { private static readonly binaryPath = app.isPackaged ? path.join(process.resourcesPath, binaryName[process.platform]) : path.join( diff --git a/src/main/services/download/download-manager.ts b/src/main/services/download/download-manager.ts index 91cc079d..9eba39f3 100644 --- a/src/main/services/download/download-manager.ts +++ b/src/main/services/download/download-manager.ts @@ -1,4 +1,4 @@ -import { Downloader, DownloadError } from "@shared"; +import { Downloader, DownloadError, FILE_EXTENSIONS_TO_EXTRACT } from "@shared"; import { WindowManager } from "../window-manager"; import { publishDownloadCompleteNotification } from "../notifications"; import type { Download, DownloadProgress, UserPreferences } from "@types"; @@ -22,7 +22,6 @@ import { logger } from "../logger"; import { db, downloadsSublevel, gamesSublevel, levelKeys } from "@main/level"; import { sortBy } from "lodash-es"; import { TorBoxClient } from "./torbox"; -import { FILE_EXTENSIONS_TO_EXTRACT } from "@shared"; import { GameFilesManager } from "../game-files-manager"; export class DownloadManager { diff --git a/src/main/services/game-files-manager.ts b/src/main/services/game-files-manager.ts index aa874ad7..d97141fd 100644 --- a/src/main/services/game-files-manager.ts +++ b/src/main/services/game-files-manager.ts @@ -3,7 +3,7 @@ import fs from "node:fs"; import type { GameShop } from "@types"; import { downloadsSublevel, gamesSublevel, levelKeys } from "@main/level"; import { FILE_EXTENSIONS_TO_EXTRACT } from "@shared"; -import { _7Zip } from "./7zip"; +import { SevenZip } from "./7zip"; import { WindowManager } from "./window-manager"; import { publishExtractionCompleteNotification } from "./notifications"; import { logger } from "./logger"; @@ -45,7 +45,7 @@ export class GameFilesManager { await Promise.all( filesToExtract.map((file) => { return new Promise((resolve, reject) => { - _7Zip.extractFile( + SevenZip.extractFile( { filePath: path.join(directoryPath, file), cwd: directoryPath, @@ -120,7 +120,7 @@ export class GameFilesManager { path.parse(download.folderName!).name ); - _7Zip.extractFile( + SevenZip.extractFile( { filePath, outputPath: extractionPath,