mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 13:34:54 +03:00
feat: use enum
This commit is contained in:
parent
789bccf77a
commit
60e0b39f86
@ -1,6 +1,7 @@
|
|||||||
import { registerEvent } from "../register-event";
|
import { registerEvent } from "../register-event";
|
||||||
import { gameRepository } from "../../repository";
|
import { gameRepository } from "../../repository";
|
||||||
import { DownloadManager } from "@main/services";
|
import { DownloadManager } from "@main/services";
|
||||||
|
import { Downloader } from "@shared";
|
||||||
|
|
||||||
const resumeGameSeed = async (
|
const resumeGameSeed = async (
|
||||||
_event: Electron.IpcMainInvokeEvent,
|
_event: Electron.IpcMainInvokeEvent,
|
||||||
@ -10,7 +11,7 @@ const resumeGameSeed = async (
|
|||||||
where: {
|
where: {
|
||||||
id: gameId,
|
id: gameId,
|
||||||
isDeleted: false,
|
isDeleted: false,
|
||||||
downloader: 1,
|
downloader: Downloader.Torrent,
|
||||||
progress: 1,
|
progress: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -9,6 +9,7 @@ import { RealDebridClient } from "./services/download/real-debrid";
|
|||||||
import { HydraApi } from "./services/hydra-api";
|
import { HydraApi } from "./services/hydra-api";
|
||||||
import { uploadGamesBatch } from "./services/library-sync";
|
import { uploadGamesBatch } from "./services/library-sync";
|
||||||
import { Aria2 } from "./services/aria2";
|
import { Aria2 } from "./services/aria2";
|
||||||
|
import { Downloader } from "@shared";
|
||||||
|
|
||||||
const loadState = async (userPreferences: UserPreferences | null) => {
|
const loadState = async (userPreferences: UserPreferences | null) => {
|
||||||
import("./events");
|
import("./events");
|
||||||
@ -37,7 +38,7 @@ const loadState = async (userPreferences: UserPreferences | null) => {
|
|||||||
const seedList = await gameRepository.find({
|
const seedList = await gameRepository.find({
|
||||||
where: {
|
where: {
|
||||||
shouldSeed: true,
|
shouldSeed: true,
|
||||||
downloader: 1,
|
downloader: Downloader.Torrent,
|
||||||
progress: 1,
|
progress: 1,
|
||||||
status: "seeding",
|
status: "seeding",
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user