mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-28 21:31:03 +00:00
Merge branch 'main' of https://github.com/hydralauncher/hydra
This commit is contained in:
@@ -3,7 +3,7 @@ import { gameRepository } from "@main/repository";
|
||||
import { registerEvent } from "../register-event";
|
||||
|
||||
import type { GameShop } from "@types";
|
||||
import { getImageBase64 } from "@main/helpers";
|
||||
import { getFileBase64 } from "@main/helpers";
|
||||
import { getSteamGameIconUrl } from "@main/services";
|
||||
|
||||
const addGameToLibrary = async (
|
||||
@@ -11,7 +11,7 @@ const addGameToLibrary = async (
|
||||
objectID: string,
|
||||
title: string,
|
||||
gameShop: GameShop,
|
||||
executablePath: string
|
||||
executablePath: string | null
|
||||
) => {
|
||||
const game = await gameRepository.findOne({
|
||||
where: {
|
||||
@@ -31,7 +31,7 @@ const addGameToLibrary = async (
|
||||
}
|
||||
);
|
||||
} else {
|
||||
const iconUrl = await getImageBase64(await getSteamGameIconUrl(objectID));
|
||||
const iconUrl = await getFileBase64(await getSteamGameIconUrl(objectID));
|
||||
|
||||
return gameRepository.insert({
|
||||
title,
|
||||
|
||||
Reference in New Issue
Block a user