mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding aria2c
This commit is contained in:
parent
2d8b63c803
commit
4060f7a1a6
30 changed files with 371 additions and 1351 deletions
|
@ -1,21 +1,20 @@
|
|||
import {
|
||||
DownloadManager,
|
||||
Ludusavi,
|
||||
PythonInstance,
|
||||
startMainLoop,
|
||||
} from "./services";
|
||||
import { DownloadManager, Ludusavi, startMainLoop } from "./services";
|
||||
import {
|
||||
downloadQueueRepository,
|
||||
userPreferencesRepository,
|
||||
} from "./repository";
|
||||
import { UserPreferences } from "./entity";
|
||||
import { RealDebridClient } from "./services/real-debrid";
|
||||
import { RealDebridClient } from "./services/download/real-debrid";
|
||||
import { HydraApi } from "./services/hydra-api";
|
||||
import { uploadGamesBatch } from "./services/library-sync";
|
||||
import { PythonRPC } from "./services/python-rpc";
|
||||
import { Aria2 } from "./services/aria2";
|
||||
|
||||
const loadState = async (userPreferences: UserPreferences | null) => {
|
||||
import("./events");
|
||||
|
||||
Aria2.spawn();
|
||||
|
||||
if (userPreferences?.realDebridApiToken) {
|
||||
RealDebridClient.authorize(userPreferences?.realDebridApiToken);
|
||||
}
|
||||
|
@ -35,11 +34,14 @@ const loadState = async (userPreferences: UserPreferences | null) => {
|
|||
},
|
||||
});
|
||||
|
||||
if (nextQueueItem?.game.status === "active") {
|
||||
DownloadManager.startDownload(nextQueueItem.game);
|
||||
} else {
|
||||
PythonInstance.spawn();
|
||||
}
|
||||
PythonRPC.spawn();
|
||||
// start download
|
||||
|
||||
// if (nextQueueItem?.game.status === "active") {
|
||||
// DownloadManager.startDownload(nextQueueItem.game);
|
||||
// } else {
|
||||
// PythonInstance.spawn();
|
||||
// }
|
||||
|
||||
startMainLoop();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue