mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'main' into feature/game-achievements
# Conflicts: # src/renderer/src/context/game-details/game-details.context.tsx # src/renderer/src/main.tsx
This commit is contained in:
commit
eda47fc6af
60 changed files with 900 additions and 641 deletions
|
|
@ -3,7 +3,6 @@ import { gameRepository } from "@main/repository";
|
|||
import { registerEvent } from "../register-event";
|
||||
|
||||
import type { GameShop } from "@types";
|
||||
import { getFileBase64 } from "@main/helpers";
|
||||
|
||||
import { steamGamesWorker } from "@main/workers";
|
||||
import { createGame } from "@main/services/library-sync";
|
||||
|
|
@ -37,20 +36,12 @@ const addGameToLibrary = async (
|
|||
? steamUrlBuilder.icon(objectID, steamGame.clientIcon)
|
||||
: null;
|
||||
|
||||
await gameRepository
|
||||
.insert({
|
||||
title,
|
||||
iconUrl,
|
||||
objectID,
|
||||
shop,
|
||||
})
|
||||
.then(() => {
|
||||
if (iconUrl) {
|
||||
getFileBase64(iconUrl).then((base64) =>
|
||||
gameRepository.update({ objectID }, { iconUrl: base64 })
|
||||
);
|
||||
}
|
||||
});
|
||||
await gameRepository.insert({
|
||||
title,
|
||||
iconUrl,
|
||||
objectID,
|
||||
shop,
|
||||
});
|
||||
}
|
||||
|
||||
updateLocalUnlockedAchivements(true, objectID);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue