mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: get process list from rpc
This commit is contained in:
parent
0c1a75eedd
commit
75c8f69e81
10 changed files with 57 additions and 49 deletions
|
@ -1,4 +1,9 @@
|
|||
import { DownloadManager, RepacksManager, startMainLoop } from "./services";
|
||||
import {
|
||||
DownloadManager,
|
||||
RepacksManager,
|
||||
RPCManager,
|
||||
startMainLoop,
|
||||
} from "./services";
|
||||
import {
|
||||
downloadQueueRepository,
|
||||
repackRepository,
|
||||
|
@ -12,8 +17,6 @@ import { MoreThan } from "typeorm";
|
|||
import { HydraApi } from "./services/hydra-api";
|
||||
import { uploadGamesBatch } from "./services/library-sync";
|
||||
|
||||
startMainLoop();
|
||||
|
||||
const loadState = async (userPreferences: UserPreferences | null) => {
|
||||
await RepacksManager.updateRepacks();
|
||||
|
||||
|
@ -35,8 +38,13 @@ const loadState = async (userPreferences: UserPreferences | null) => {
|
|||
},
|
||||
});
|
||||
|
||||
if (nextQueueItem?.game.status === "active")
|
||||
if (nextQueueItem?.game.status === "active") {
|
||||
DownloadManager.startDownload(nextQueueItem.game);
|
||||
} else {
|
||||
RPCManager.spawn();
|
||||
}
|
||||
|
||||
startMainLoop();
|
||||
|
||||
const now = new Date();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue