This commit is contained in:
Hachi-R 2024-12-21 16:28:01 -03:00
parent 4b8569bd5e
commit 90b320952b
2 changed files with 16 additions and 16 deletions

View File

@ -218,7 +218,7 @@ export class DownloadManager {
action: "pause", action: "pause",
game_id: gameId, game_id: gameId,
} as PauseDownloadPayload) } as PauseDownloadPayload)
.catch(() => { }); .catch(() => {});
} }
static async resumeSeeding( static async resumeSeeding(
@ -235,7 +235,7 @@ export class DownloadManager {
action: "pause", action: "pause",
game_id: this.downloadingGameId, game_id: this.downloadingGameId,
} as PauseDownloadPayload) } as PauseDownloadPayload)
.catch(() => { }); .catch(() => {});
WindowManager.mainWindow?.setProgressBar(-1); WindowManager.mainWindow?.setProgressBar(-1);

View File

@ -3,21 +3,21 @@ import { DownloadManager } from "./download/download-manager";
import { sleep } from "@main/helpers"; import { sleep } from "@main/helpers";
export const startSeedProcess = async () => { export const startSeedProcess = async () => {
const seedList = await gameRepository.find({ const seedList = await gameRepository.find({
where: { where: {
shouldSeed: true, shouldSeed: true,
downloader: 1, downloader: 1,
progress: 1, progress: 1,
}, },
}); });
if (seedList.length === 0) return; if (seedList.length === 0) return;
await sleep(1000); await sleep(1000);
// wait for python process to start // wait for python process to start
seedList.map(async (game) => { seedList.map(async (game) => {
await DownloadManager.startDownload(game); await DownloadManager.startDownload(game);
await sleep(100); await sleep(100);
}); });
}; };