mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 09:43:57 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bc1c1c58c |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydralauncher",
|
"name": "hydralauncher",
|
||||||
"version": "3.6.4",
|
"version": "3.6.5",
|
||||||
"description": "Hydra",
|
"description": "Hydra",
|
||||||
"main": "./out/main/index.js",
|
"main": "./out/main/index.js",
|
||||||
"author": "Los Broxas",
|
"author": "Los Broxas",
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const createSteamShortcut = async (
|
|||||||
|
|
||||||
if (!steamUserIds.length) {
|
if (!steamUserIds.length) {
|
||||||
logger.error("No Steam user ID found");
|
logger.error("No Steam user ID found");
|
||||||
return;
|
throw new Error("No Steam user ID found");
|
||||||
}
|
}
|
||||||
|
|
||||||
const [iconImage, heroImage, logoImage, coverImage, libraryImage] =
|
const [iconImage, heroImage, logoImage, coverImage, libraryImage] =
|
||||||
|
|||||||
@@ -279,13 +279,17 @@ export const findAchievementFiles = (game: Game) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const steamUserIds = await getSteamUsersIds();
|
const steamUserIds = await getSteamUsersIds();
|
||||||
const steamPath = await getSteamLocation();
|
const steamPath = await getSteamLocation().catch(() => null);
|
||||||
|
|
||||||
export const findAchievementFileInSteamPath = async (game: Game) => {
|
export const findAchievementFileInSteamPath = async (game: Game) => {
|
||||||
if (!steamUserIds.length) {
|
if (!steamUserIds.length) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!steamPath) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const userPreferences = await db.get<string, UserPreferences | null>(
|
const userPreferences = await db.get<string, UserPreferences | null>(
|
||||||
levelKeys.userPreferences,
|
levelKeys.userPreferences,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ export const getSteamLocation = async () => {
|
|||||||
reject(err);
|
reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!value) {
|
||||||
|
reject(new Error("SteamPath not found in registry"));
|
||||||
|
}
|
||||||
|
|
||||||
resolve(value.value);
|
resolve(value.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -78,7 +82,11 @@ export const getSteamAppDetails = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getSteamUsersIds = async () => {
|
export const getSteamUsersIds = async () => {
|
||||||
const userDataPath = await getSteamLocation();
|
const userDataPath = await getSteamLocation().catch(() => null);
|
||||||
|
|
||||||
|
if (!userDataPath) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const userIds = fs.readdirSync(path.join(userDataPath, "userdata"), {
|
const userIds = fs.readdirSync(path.join(userDataPath, "userdata"), {
|
||||||
withFileTypes: true,
|
withFileTypes: true,
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ export function GameItem({ game }: GameItemProps) {
|
|||||||
setAdded(exists);
|
setAdded(exists);
|
||||||
}, [library, game.shop, game.objectId]);
|
}, [library, game.shop, game.objectId]);
|
||||||
|
|
||||||
const addGameToLibrary = async (event: React.MouseEvent | React.KeyboardEvent) => {
|
const addGameToLibrary = async (
|
||||||
|
event: React.MouseEvent | React.KeyboardEvent
|
||||||
|
) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
if (added || isAddingToLibrary) return;
|
if (added || isAddingToLibrary) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user