mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: move initial seeding for DownloadManager
This commit is contained in:
parent
843301c8b6
commit
f853a2a39e
4 changed files with 26 additions and 7 deletions
|
@ -1,6 +1,7 @@
|
|||
import { DownloadManager, Ludusavi, startMainLoop } from "./services";
|
||||
import {
|
||||
downloadQueueRepository,
|
||||
gameRepository,
|
||||
userPreferencesRepository,
|
||||
} from "./repository";
|
||||
import { UserPreferences } from "./entity";
|
||||
|
@ -35,14 +36,20 @@ const loadState = async (userPreferences: UserPreferences | null) => {
|
|||
},
|
||||
});
|
||||
|
||||
const seedList = await gameRepository.find({
|
||||
where: {
|
||||
shouldSeed: true,
|
||||
downloader: 1,
|
||||
progress: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (nextQueueItem?.game.status === "active") {
|
||||
DownloadManager.startRPC(nextQueueItem.game);
|
||||
DownloadManager.startRPC(nextQueueItem.game, seedList);
|
||||
} else {
|
||||
PythonRPC.spawn();
|
||||
}
|
||||
|
||||
await startSeedProcess();
|
||||
|
||||
startMainLoop();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue