mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-12 06:16:17 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
311d4658bc | ||
|
|
30601df677 | ||
|
|
4daead6b72 | ||
|
|
b6c433dea9 | ||
|
|
cca94376c8 | ||
|
|
30e7fe0e21 |
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@@ -100,16 +100,9 @@ jobs:
|
||||
GITHUB_ACTOR: ${{ github.actor }}
|
||||
run: node scripts/upload-build.cjs
|
||||
|
||||
- name: Get package-json version
|
||||
id: get-version
|
||||
uses: beaconbrigade/package-json-version@v0.3.2
|
||||
with:
|
||||
path: .
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ steps.get-version.outputs.version }}
|
||||
draft: true
|
||||
files: |
|
||||
dist/*.exe
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydralauncher",
|
||||
"version": "3.4.7",
|
||||
"version": "3.4.8",
|
||||
"description": "Hydra",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "Los Broxas",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
import type { Game, GameShop } from "@types";
|
||||
import type { GameShop } from "@types";
|
||||
|
||||
import { steamGamesWorker } from "@main/workers";
|
||||
import { createGame } from "@main/services/library-sync";
|
||||
@@ -15,7 +15,7 @@ const addGameToLibrary = async (
|
||||
title: string
|
||||
) => {
|
||||
const gameKey = levelKeys.game(shop, objectId);
|
||||
const game = await gamesSublevel.get(gameKey);
|
||||
let game = await gamesSublevel.get(gameKey);
|
||||
|
||||
if (game) {
|
||||
await downloadsSublevel.del(gameKey);
|
||||
@@ -33,7 +33,7 @@ const addGameToLibrary = async (
|
||||
? steamUrlBuilder.icon(objectId, steamGame.clientIcon)
|
||||
: null;
|
||||
|
||||
const game: Game = {
|
||||
game = {
|
||||
title,
|
||||
iconUrl,
|
||||
objectId,
|
||||
@@ -45,11 +45,11 @@ const addGameToLibrary = async (
|
||||
};
|
||||
|
||||
await gamesSublevel.put(levelKeys.game(shop, objectId), game);
|
||||
|
||||
await createGame(game).catch(() => {});
|
||||
|
||||
updateLocalUnlockedAchievements(game);
|
||||
}
|
||||
|
||||
await createGame(game).catch(() => {});
|
||||
|
||||
updateLocalUnlockedAchievements(game);
|
||||
};
|
||||
|
||||
registerEvent("addGameToLibrary", addGameToLibrary);
|
||||
|
||||
@@ -40,7 +40,7 @@ const startGameDownload = async (
|
||||
/* Delete any previous download */
|
||||
await downloadsSublevel.del(gameKey);
|
||||
|
||||
if (game?.isDeleted) {
|
||||
if (game) {
|
||||
await gamesSublevel.put(gameKey, {
|
||||
...game,
|
||||
isDeleted: false,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { gamesSublevel, levelKeys } from "@main/level";
|
||||
export const createGame = async (game: Game) => {
|
||||
return HydraApi.post(`/profile/games`, {
|
||||
objectId: game.objectId,
|
||||
playTimeInMilliseconds: Math.trunc(game.playTimeInMilliseconds),
|
||||
playTimeInMilliseconds: Math.trunc(game.playTimeInMilliseconds ?? 0),
|
||||
shop: game.shop,
|
||||
lastTimePlayed: game.lastTimePlayed,
|
||||
}).then((response) => {
|
||||
|
||||
Reference in New Issue
Block a user