feat: checking updates only for games with executables

This commit is contained in:
Moyasee
2025-11-11 01:14:27 +02:00
parent b578af4612
commit 44b24ab63d
2 changed files with 6 additions and 4 deletions

View File

@@ -101,18 +101,18 @@ export class DownloadSourcesChecker {
logger.info("DownloadSourcesChecker.checkForChanges() called");
try {
// Get all installed games (excluding custom games)
// Get all installed games (excluding custom games and games without executable)
const installedGames = await gamesSublevel.values().all();
const nonCustomGames = installedGames.filter(
(game: Game) => game.shop !== "custom"
(game: Game) => game.shop !== "custom" && game.executablePath
);
logger.info(
`Found ${installedGames.length} total games, ${nonCustomGames.length} non-custom games`
`Found ${installedGames.length} total games, ${nonCustomGames.length} non-custom games with executable path`
);
if (nonCustomGames.length === 0) {
logger.info(
"No non-custom games found, skipping download sources check"
"No non-custom games with executable path found, skipping download sources check"
);
return;
}

View File

@@ -200,6 +200,8 @@ export function RepacksModal({
if (viewedRepackIds.has(repack.id)) return false;
if (!game?.executablePath) return false;
if (!lastCheckTimestamp || !repack.createdAt) {
return false;
}