This commit is contained in:
Hachi-R 2024-12-22 09:07:02 -03:00
parent 93ef0c256e
commit bd184fceda
2 changed files with 2 additions and 9 deletions

View file

@ -4,7 +4,6 @@ import { DownloadManager } from "@main/services";
import { dataSource } from "@main/data-source";
import { Game } from "@main/entity";
const pauseGameSeed = async (
_event: Electron.IpcMainInvokeEvent,
gameId: number
@ -12,10 +11,7 @@ const pauseGameSeed = async (
await dataSource.transaction(async (transactionalEntityManager) => {
await transactionalEntityManager
.getRepository(Game)
.update(
{ id: gameId },
{ status: "complete", shouldSeed: false }
);
.update({ id: gameId }, { status: "complete", shouldSeed: false });
});
await DownloadManager.cancelDownload(gameId);

View file

@ -23,10 +23,7 @@ const resumeGameSeed = async (
await dataSource.transaction(async (transactionalEntityManager) => {
await transactionalEntityManager
.getRepository(Game)
.update(
{ id: gameId },
{ status: "seeding", shouldSeed: true }
);
.update({ id: gameId }, { status: "seeding", shouldSeed: true });
});
await DownloadManager.startDownload(game);