From 60e0b39f860e7f155cb17732c2fad0d9149e01fd Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Mon, 23 Dec 2024 23:47:34 -0300 Subject: [PATCH] feat: use enum --- src/main/events/torrenting/resume-game-seed.ts | 3 ++- src/main/main.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/events/torrenting/resume-game-seed.ts b/src/main/events/torrenting/resume-game-seed.ts index 6310f5b8..9f79e53a 100644 --- a/src/main/events/torrenting/resume-game-seed.ts +++ b/src/main/events/torrenting/resume-game-seed.ts @@ -1,6 +1,7 @@ import { registerEvent } from "../register-event"; import { gameRepository } from "../../repository"; import { DownloadManager } from "@main/services"; +import { Downloader } from "@shared"; const resumeGameSeed = async ( _event: Electron.IpcMainInvokeEvent, @@ -10,7 +11,7 @@ const resumeGameSeed = async ( where: { id: gameId, isDeleted: false, - downloader: 1, + downloader: Downloader.Torrent, progress: 1, }, }); diff --git a/src/main/main.ts b/src/main/main.ts index 03794ce3..0b472a5b 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -9,6 +9,7 @@ import { RealDebridClient } from "./services/download/real-debrid"; import { HydraApi } from "./services/hydra-api"; import { uploadGamesBatch } from "./services/library-sync"; import { Aria2 } from "./services/aria2"; +import { Downloader } from "@shared"; const loadState = async (userPreferences: UserPreferences | null) => { import("./events"); @@ -37,7 +38,7 @@ const loadState = async (userPreferences: UserPreferences | null) => { const seedList = await gameRepository.find({ where: { shouldSeed: true, - downloader: 1, + downloader: Downloader.Torrent, progress: 1, status: "seeding", },