Skip to content

Commit

Permalink
Fix search matching for game titles containing apostrophe (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkusmanch authored Feb 17, 2024
1 parent 06c97da commit fe45e46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extension.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Id: PCGamingWikiMetadata_c038558e-427b-4551-be4c-be7009ce5a8d
Name: PCGamingWiki Metadata Provider
Author: sharkusmanch
Version: 1.2.3
Version: 1.2.4
Module: PCGamingWikiMetadata.dll
Type: MetadataProvider
Icon: icon.png
6 changes: 6 additions & 0 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
AddonId: PCGamingWikiMetadata_c038558e-427b-4551-be4c-be7009ce5a8d
Packages:
- Version: 1.2.4
RequiredApiVersion: 6.11.0
ReleaseDate: 2024-02-16
PackageUrl: https://github.com/sharkusmanch/playnite-pcgamingwiki-metadata-provider/releases/download/v1.2.4/PCGamingWiki_Metadata_Provider_v1.2.4.pext
Changelog:
- Fix search matching for game titles containing apostrophe
- Version: 1.2.3
RequiredApiVersion: 6.11.0
ReleaseDate: 2024-02-16
Expand Down
3 changes: 2 additions & 1 deletion src/PCGWClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public JObject ExecuteRequest(RestRequest request)

private string NormalizeSearchString(string search)
{
return search.Replace("-", " ");
// Replace ' with " as a workaround for search API returning no results
return search.Replace("-", " ").Replace("'", "\"");
}

public List<GenericItemOption> SearchGames(string searchName)
Expand Down

0 comments on commit fe45e46

Please sign in to comment.