mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: adding steam client icon cache
This commit is contained in:
parent
e5fec91062
commit
19f022e0f6
23 changed files with 184 additions and 145 deletions
|
@ -1,5 +1,5 @@
|
|||
import { stateManager } from "./state-manager";
|
||||
import { repackersOn1337x } from "./constants";
|
||||
import { repackersOn1337x, seedsPath } from "./constants";
|
||||
import {
|
||||
getNewGOGGames,
|
||||
getNewRepacksFromUser,
|
||||
|
@ -11,7 +11,6 @@ import {
|
|||
import {
|
||||
gameRepository,
|
||||
repackRepository,
|
||||
steamGameRepository,
|
||||
userPreferencesRepository,
|
||||
} from "./repository";
|
||||
import { TorrentDownloader } from "./services";
|
||||
|
@ -20,6 +19,8 @@ import { Notification } from "electron";
|
|||
import { t } from "i18next";
|
||||
import { GameStatus } from "@shared";
|
||||
import { In } from "typeorm";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { RealDebridClient } from "./services/real-debrid";
|
||||
|
||||
startProcessWatcher();
|
||||
|
@ -69,18 +70,15 @@ const checkForNewRepacks = async (userPreferences: UserPreferences | null) => {
|
|||
};
|
||||
|
||||
const loadState = async (userPreferences: UserPreferences | null) => {
|
||||
const [repacks, steamGames] = await Promise.all([
|
||||
repackRepository.find({
|
||||
order: {
|
||||
createdAt: "desc",
|
||||
},
|
||||
}),
|
||||
steamGameRepository.find({
|
||||
order: {
|
||||
name: "asc",
|
||||
},
|
||||
}),
|
||||
]);
|
||||
const repacks = await repackRepository.find({
|
||||
order: {
|
||||
createdAt: "desc",
|
||||
},
|
||||
});
|
||||
|
||||
const steamGames = JSON.parse(
|
||||
fs.readFileSync(path.join(seedsPath, "steam-games.json"), "utf-8")
|
||||
);
|
||||
|
||||
stateManager.setValue("repacks", repacks);
|
||||
stateManager.setValue("steamGames", steamGames);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue