diff --git a/package-lock.json b/package-lock.json index 526cfa8b9..c82223a7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "0.1.18", - "@fparchive/flashpoint-archive": "0.7.9", + "@fparchive/flashpoint-archive": "0.7.10", "@types/react-virtualized": "^9.21.21", "axios": "1.6.7", "connected-react-router": "6.9.2", @@ -992,24 +992,24 @@ } }, "node_modules/@fparchive/flashpoint-archive": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive/-/flashpoint-archive-0.7.9.tgz", - "integrity": "sha512-eorVZMQdZVyXSwx6xN8CEWz0MYsrCjF/k90Jyr+vFB2d0/DFk6FZlU/3wK3Oy0SBTuBqZRLoGdCkp5sbN1yTeQ==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive/-/flashpoint-archive-0.7.10.tgz", + "integrity": "sha512-H0MoHvKmWLPFFywEnUhXfBuH22jMUFX+7YGaXFqF2bvrOsCVWakhjbK+3W7BrHBFyIbM38OvZTjzRqNoaeRAig==", "engines": { "node": ">= 10" }, "optionalDependencies": { - "@fparchive/flashpoint-archive-darwin-arm64": "0.7.9", - "@fparchive/flashpoint-archive-darwin-x64": "0.7.9", - "@fparchive/flashpoint-archive-linux-x64-gnu": "0.7.9", - "@fparchive/flashpoint-archive-win32-ia32-msvc": "0.7.9", - "@fparchive/flashpoint-archive-win32-x64-msvc": "0.7.9" + "@fparchive/flashpoint-archive-darwin-arm64": "0.7.10", + "@fparchive/flashpoint-archive-darwin-x64": "0.7.10", + "@fparchive/flashpoint-archive-linux-x64-gnu": "0.7.10", + "@fparchive/flashpoint-archive-win32-ia32-msvc": "0.7.10", + "@fparchive/flashpoint-archive-win32-x64-msvc": "0.7.10" } }, "node_modules/@fparchive/flashpoint-archive-darwin-arm64": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-arm64/-/flashpoint-archive-darwin-arm64-0.7.9.tgz", - "integrity": "sha512-GukQOQ+aKfkNEPkdnKItK+4jQyu5FJYZqzj2V/y7JgNXtysGCSZd8seS+Ucbfr5yLNPKUAlcgZVI48r0PoAVOw==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-arm64/-/flashpoint-archive-darwin-arm64-0.7.10.tgz", + "integrity": "sha512-yy4atd/uHfshh1xMSHYh/f3HUzV9y+imFr+JzdblG58RH5vBPKNCaNoDxwJrTuo3/0bWutF6p/w3PNsPKmL0OA==", "cpu": [ "arm64" ], @@ -1022,9 +1022,9 @@ } }, "node_modules/@fparchive/flashpoint-archive-darwin-x64": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-x64/-/flashpoint-archive-darwin-x64-0.7.9.tgz", - "integrity": "sha512-V4NWsTzLv3fElDxqvumlQZVZCPq3F71TX8PWfzjq/mFfspzidXaAcvtVb7LdyelToEGBC8irvDIY6uWmUfMryQ==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-darwin-x64/-/flashpoint-archive-darwin-x64-0.7.10.tgz", + "integrity": "sha512-51IG4mdfDMDXHFnnQRmQ2VS/gk0wRQFVJz6JsnDk4ARvJzANO1t6ws91KciwzLgRjyI36btEnBuzk4GOILE9bg==", "cpu": [ "x64" ], @@ -1037,9 +1037,9 @@ } }, "node_modules/@fparchive/flashpoint-archive-linux-x64-gnu": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-linux-x64-gnu/-/flashpoint-archive-linux-x64-gnu-0.7.9.tgz", - "integrity": "sha512-apERZUgK/gY76Es9EGbhvFEXiKJZzp68iRfCLvHpfHjX+HmSmeuC8hkl70S+LDonCkp5jXFqsQx/uAwe8SSxQQ==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-linux-x64-gnu/-/flashpoint-archive-linux-x64-gnu-0.7.10.tgz", + "integrity": "sha512-Vsiqjg4TJzuy1Iuuhydam9mmUhLEAcW/47vfBwwzB1BBaUMACzTBdIF2rXFRK14tc9VcTwrHPBilvw121jJtww==", "cpu": [ "x64" ], @@ -1052,9 +1052,9 @@ } }, "node_modules/@fparchive/flashpoint-archive-win32-ia32-msvc": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-ia32-msvc/-/flashpoint-archive-win32-ia32-msvc-0.7.9.tgz", - "integrity": "sha512-PJCRy3zRyeB8E67gLI0aITgEdSTWDTjHjmvbiXhjaaEku0EZG7WUKJDU4asQilIjL0aRjhBMkd5vFjGvPLG1CA==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-ia32-msvc/-/flashpoint-archive-win32-ia32-msvc-0.7.10.tgz", + "integrity": "sha512-WF5D3CPBbpKSOuFwDSnc1tprcfFAuDs6dRopiygH4aP+fzZPCZuuL7GKZLRk+MMkWUV64dAz4hc5dh4au0O7vQ==", "cpu": [ "ia32" ], @@ -1067,9 +1067,9 @@ } }, "node_modules/@fparchive/flashpoint-archive-win32-x64-msvc": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-x64-msvc/-/flashpoint-archive-win32-x64-msvc-0.7.9.tgz", - "integrity": "sha512-XwfR6Dp4XXN2GnzN6HPZrZYnviM9ROYYXhV/kdEbfQWCIo1DvRS6prq+eFIU4/dHqBrukQMHTI0H1GPtf65b2w==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@fparchive/flashpoint-archive-win32-x64-msvc/-/flashpoint-archive-win32-x64-msvc-0.7.10.tgz", + "integrity": "sha512-6zlFsxYSwEbArg1r9P/+rq7L2HxY0vBSY6DOU7Z2TPoNxi9fguSM75OClZ8G+vHtwNKHYtPYQ/ktSgwfXQGzcQ==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index 77c92a615..7fc09b0fe 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@fortawesome/fontawesome-svg-core": "1.2.36", "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "0.1.18", - "@fparchive/flashpoint-archive": "0.7.9", + "@fparchive/flashpoint-archive": "0.7.10", "@types/react-virtualized": "^9.21.21", "axios": "1.6.7", "connected-react-router": "6.9.2", diff --git a/src/back/curate/parse.ts b/src/back/curate/parse.ts index 51f0cd052..305dda534 100644 --- a/src/back/curate/parse.ts +++ b/src/back/curate/parse.ts @@ -202,16 +202,20 @@ async function getTagsFromStr(tagsStr: string, tagCategoriesStr: string): Promis const trimmedName = tagName.trim(); const category = splitCategories.length > index ? splitCategories[index].trim() : undefined; if (trimmedName !== '' && trimmedName !== '[object Object]') { - let tag = await fpDatabase.findTag(trimmedName); - if (!tag) { - // Tag doesn't exist, make a new one - tag = await fpDatabase.createTag(trimmedName, category); - } - if (tag !== null) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - if (tags.findIndex(t => t.id === tag!.id) === -1) { - tags.push(tag); + try { + let tag = await fpDatabase.findTag(trimmedName); + if (!tag) { + // Tag doesn't exist, make a new one + tag = await fpDatabase.createTag(trimmedName, category); + } + if (tag !== null) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + if (tags.findIndex(t => t.id === tag!.id) === -1) { + tags.push(tag); + } } + } catch (error) { + log.error('Launcher', `Unknown Curation Error loading Tag - ${trimmedName} - ${error}`); } } } diff --git a/src/renderer/store/curate/reducer.ts b/src/renderer/store/curate/reducer.ts index 77e65f30d..01c03f730 100644 --- a/src/renderer/store/curate/reducer.ts +++ b/src/renderer/store/curate/reducer.ts @@ -249,7 +249,7 @@ export function curateStateReducer(state: CurateState = createInitialState(), ac curation.game.primaryPlatform = action.platform.name; if (action.platformAppPaths) { // Find best app path - if (curation.game.primaryPlatform in action.platformAppPaths) { + if (curation.game.primaryPlatform in action.platformAppPaths && action.platformAppPaths[curation.game.primaryPlatform].length > 0) { curation.game.applicationPath = action.platformAppPaths[curation.game.primaryPlatform][0].appPath; } }