fix: added the @globals back and removed some merge leftovers

This commit is contained in:
lilezek 2024-04-30 11:09:29 +02:00
parent c8fe984171
commit 6d36db5446
8 changed files with 535 additions and 367 deletions

View file

@ -1,5 +1,5 @@
import { stateManager } from "./state-manager";
import { GameStatus, repackers } from "./constants";
import { repackers } from "./constants";
import {
getNewGOGGames,
getNewRepacksFromCPG,
@ -17,11 +17,13 @@ import {
steamGameRepository,
userPreferencesRepository,
} from "./repository";
import { TorrentClient } from "./services/torrent-client";
import { TorrentClient } from "./services/donwloaders/torrent-client";
import { Repack } from "./entity";
import { Notification } from "electron";
import { t } from "i18next";
import { In } from "typeorm";
import { Downloader } from "./services/donwloaders/downloader";
import { GameStatus } from "@globals";
startProcessWatcher();
@ -40,12 +42,7 @@ Promise.all([writePipe.createPipe(), readPipe.createPipe()]).then(async () => {
});
if (game) {
writePipe.write({
action: "start",
game_id: game.id,
magnet: game.repack.magnet,
save_path: game.downloadPath,
});
Downloader.downloadGame(game, game.repack);
}
readPipe.socket?.on("data", (data) => {
@ -126,4 +123,4 @@ const loadState = async () => {
import("./events");
};
loadState().then(() => checkForNewRepacks());
loadState().then(() => checkForNewRepacks());