feat: using rpc to communicate

This commit is contained in:
Chubby Granny Chaser 2024-06-27 17:18:48 +01:00
parent 05cfdefc84
commit 328b7cb137
No known key found for this signature in database
15 changed files with 332 additions and 298 deletions

View file

@ -1,5 +1,5 @@
import { registerEvent } from "../register-event";
import { DownloadManager, HydraApi, gamesPlaytime } from "@main/services";
import { HydraApi, TorrentDownloader, gamesPlaytime } from "@main/services";
import { dataSource } from "@main/data-source";
import { DownloadQueue, Game, UserAuth } from "@main/entity";
@ -19,8 +19,8 @@ const signOut = async (_event: Electron.IpcMainInvokeEvent) => {
gamesPlaytime.clear();
});
/* Disconnects aria2 */
DownloadManager.kill();
/* Disconnects libtorrent */
TorrentDownloader.kill();
await Promise.all([
databaseOperations,