Skip to content

Commit

Permalink
fix search
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfagun74 committed Oct 25, 2024
1 parent d8edecb commit 1c7bf4c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ export abstract class MetadataProvider implements OnModuleInit {
game: GamevaultGame,
): Promise<MinimalGameMetadataDto> {
// Search for the game using all available metadata providers but remove Edition Tags in the search.
const gameResults = await this.search(game.title.replace(/\[.*?\]/g, ""));
const gameResults = await this.search(
game.title
.replace(/\[.*?\]/g, "")
.replaceAll(" ", " ")
.trim(),
);

// If no matching games are found, throw an exception.
if (gameResults.length === 0) {
Expand Down

0 comments on commit 1c7bf4c

Please sign in to comment.