Files
hydra/src/main/events/torrenting/pause-game-download.ts
Chubby Granny Chaser 4941709296 feat: adding aria2
2024-05-20 02:21:11 +01:00

14 lines
419 B
TypeScript

import { registerEvent } from "../register-event";
import { gameRepository } from "../../repository";
import { DownloadManager } from "@main/services";
const pauseGameDownload = async (
_event: Electron.IpcMainInvokeEvent,
gameId: number
) => {
await DownloadManager.pauseDownload();
await gameRepository.update({ id: gameId }, { status: "paused" });
};
registerEvent("pauseGameDownload", pauseGameDownload);