Skip to content

Commit

Permalink
Don't send invalid search strings to IGDB
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefNemec committed Sep 24, 2021
1 parent 8b84f24 commit b2189b3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/Metadata/IGDBMetadata/IgdbLazyMetadataProvider.cs
Original file line number Diff line number Diff line change
@@ -381,8 +381,15 @@ private void GetIgdbMetadata()
}
else
{
var res = plugin.GetSearchResults(a);
return res.Select(b => b as GenericItemOption).ToList();
if (a.IsNullOrWhiteSpace())
{
return new List<GenericItemOption>();
}
else
{
var res = plugin.GetSearchResults(a.Replace("\\", "").Replace("/", "").Trim());
return res.Select(b => b as GenericItemOption).ToList();
}
}
}, options.GameData.Name);

0 comments on commit b2189b3

Please sign in to comment.