From e86aa80df6956edcc4c390c84919cf5db644201e Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Thu, 29 Jun 2023 09:29:23 +1000 Subject: [PATCH] fix: added early breakout from game search if the title is found --- gaseous-server/Classes/ImportGames.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gaseous-server/Classes/ImportGames.cs b/gaseous-server/Classes/ImportGames.cs index febd54a..fdde254 100644 --- a/gaseous-server/Classes/ImportGames.cs +++ b/gaseous-server/Classes/ImportGames.cs @@ -199,6 +199,7 @@ namespace gaseous_server.Classes foreach (string SearchCandidate in SearchCandidates) { + bool GameFound = false; Logging.Log(Logging.LogType.Information, "Import Game", " Searching for title: " + SearchCandidate); @@ -211,6 +212,7 @@ namespace gaseous_server.Classes // exact match! determinedGame = Metadata.Games.GetGame((long)games[0].Id, false, false); Logging.Log(Logging.LogType.Information, "Import Game", " IGDB game: " + determinedGame.Name); + GameFound = true; break; } else if (games.Length > 0) @@ -222,6 +224,7 @@ namespace gaseous_server.Classes Logging.Log(Logging.LogType.Information, "Import Game", " No search results found"); } } + if (GameFound == true) { break; } } if (determinedGame == null) {