Skip to content

Commit

Permalink
fix: reduce count needed for games to display
Browse files Browse the repository at this point in the history
  • Loading branch information
Tormak9970 committed Jul 11, 2023
1 parent f0b538e commit 1e41768
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "steam-art-manager",
"version": "2.6.4",
"version": "2.6.3",
"private": true,
"type": "module",
"author": {
Expand Down
8 changes: 4 additions & 4 deletions src/lib/controllers/AppController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ export class AppController {

const entries = Object.entries(res);
unfilteredLibraryCache.set(JSON.parse(JSON.stringify(unfiltered)));
// const filtered = entries.filter(([appId, entry]) => Object.keys(entry).length >= 4 || shortcutIds.includes(appId)); //! Removed this because it caused issues with games with no grids
const filtered = entries;
const filtered = entries.filter(([appId, entry]) => Object.keys(entry).length >= 2 || shortcutIds.includes(appId)); //! Look into this because it seems like it aint ideal this because it caused issues with games with no grids
// const filtered = entries;
return Object.fromEntries(filtered);
}

Expand Down Expand Up @@ -450,15 +450,15 @@ export class AppController {
const filteredKeys = Object.keys(filteredCache);

if (online && !needsSteamAPIKey) {
const apiGames = await this.getGamesFromSteamAPI(bUserId);
const apiGames = (await this.getGamesFromSteamAPI(bUserId)).filter((entry) => filteredKeys.includes(entry.appid.toString()));
console.log("Steam API Games:", apiGames);
steamGames.set(apiGames);

LogController.log(`Loaded ${apiGames.length} games from Steam API.`);
LogController.log("Steam games loaded.");
} else if (online) {
try {
const publicGames = (await this.getGamesFromSteamCommunity(bUserId)).filter((entry: GameStruct) => !entry.name.toLowerCase().includes("soundtrack"));
const publicGames = (await this.getGamesFromSteamCommunity(bUserId)).filter((entry: GameStruct) => filteredKeys.includes(entry.appid.toString()) && !entry.name.toLowerCase().includes("soundtrack"));
console.log("Public Games:", publicGames);
steamGames.set(publicGames);

Expand Down

0 comments on commit 1e41768

Please sign in to comment.