Skip to content

Commit 8d2eb9b

Browse files
committed
fix: skip non-installed owned games on macOS
1 parent 25640cf commit 8d2eb9b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/backend/storeManagers/steam/library.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import path from 'node:path'
55
import { parse } from '@node-steam/vdf'
66
import { existsSync, readFileSync } from 'graceful-fs'
77
import { readdir } from 'node:fs/promises'
8-
import { getSteamLibraries } from 'backend/constants'
8+
import { getSteamLibraries, isMac } from 'backend/constants'
99
import { logDebug, LogPrefix, logWarning } from 'backend/logger/logger'
1010
import { isOnline } from 'backend/online_monitor'
1111
import { steamDBBaseURL } from 'backend/shortcuts/nonesteamgame/constants'
@@ -27,6 +27,13 @@ const installed = new Map<string, SteamInstallInfo>()
2727
export async function getOwnedGames(
2828
userId: string
2929
): Promise<OwnedGame[] | undefined> {
30+
if (isMac) {
31+
logWarning('getOwnedGames is not supported on macOS', {
32+
prefix: LogPrefix.Steam
33+
})
34+
return []
35+
}
36+
3037
const url = new URL(
3138
'https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?format=json&include_appinfo=true'
3239
)

0 commit comments

Comments
 (0)