Skip to content

Commit

Permalink
fixed amazon games parser adding uninstalled games
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartondock committed Mar 30, 2023
1 parent cfa2fd9 commit 7a7b1f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/parsers/amazon-games.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export class AmazonGamesParser implements GenericParser {
const db = sqlite(dbPath);

const games: {extractedTitle: string, filePath: string, startInDirectory?: string, launchOptions?: string}[] =
db.prepare("select ProductTitle, InstallDirectory, Id from DbSet")
db.prepare("select ProductTitle, InstallDirectory, Installed, Id from DbSet")
.all()
.filter(({ InstallDirectory }:{ [key:string]:string }) => {
return fs.existsSync(`${InstallDirectory}\\fuel.json`) || launcherMode;
.filter(({ InstallDirectory, Installed }:{ [key:string]:string }) => {
return (fs.existsSync(`${InstallDirectory}\\fuel.json`) || launcherMode) && Installed;
})
.map(({ ProductTitle, InstallDirectory, Id }: { [key:string]:string }) => {
.map(({ ProductTitle, InstallDirectory, Installed, Id }: { [key:string]:string }) => {
if (launcherMode) {
return {
extractedTitle: ProductTitle,
Expand Down

0 comments on commit 7a7b1f5

Please sign in to comment.