mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding auto refresh of download sources
This commit is contained in:
parent
3da751a67b
commit
0ea2cd39db
19 changed files with 241 additions and 93 deletions
|
@ -8,6 +8,7 @@ import { UserPreferences } from "./entity";
|
|||
import { RealDebridClient } from "./services/real-debrid";
|
||||
import { Not } from "typeorm";
|
||||
import { repacksWorker } from "./workers";
|
||||
import { fetchDownloadSourcesAndUpdate } from "./helpers";
|
||||
|
||||
startMainLoop();
|
||||
|
||||
|
@ -27,15 +28,14 @@ const loadState = async (userPreferences: UserPreferences | null) => {
|
|||
|
||||
if (game) DownloadManager.startDownload(game);
|
||||
|
||||
repackRepository
|
||||
.find({
|
||||
order: {
|
||||
createdAt: "DESC",
|
||||
},
|
||||
})
|
||||
.then((repacks) => {
|
||||
repacksWorker.run(repacks, { name: "setRepacks" });
|
||||
});
|
||||
const repacks = await repackRepository.find({
|
||||
order: {
|
||||
createdAt: "DESC",
|
||||
},
|
||||
});
|
||||
|
||||
repacksWorker.run(repacks, { name: "setRepacks" });
|
||||
fetchDownloadSourcesAndUpdate();
|
||||
};
|
||||
|
||||
userPreferencesRepository
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue