[ROMM-2722] Fix matching special chars in ssfr

This commit is contained in:
Georges-Antoine Assi
2025-12-07 19:05:42 -05:00
parent 1b566b29b5
commit 76d445ccd9
4 changed files with 4 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ async def auth_middleware(
Reference: https://api-docs.retroachievements.org/getting-started.html#quick-start-http-requests
"""
req.url = req.url.update_query({"y": RETROACHIEVEMENTS_API_KEY})
req.url = req.url.update_query({"y": RETROACHIEVEMENTS_API_KEY}) # type: ignore
return await handler(req)

View File

@@ -97,7 +97,7 @@ def _normalize_search_term(
class MetadataHandler(abc.ABC):
SEARCH_TERM_SPLIT_PATTERN = re.compile(r"[\:\-\/]")
SEARCH_TERM_NORMALIZER = re.compile(r"\s*[:-]\s*")
SEARCH_TERM_NORMALIZER = re.compile(r"\s*[:-]\s+")
@classmethod
@abc.abstractmethod

View File

@@ -689,7 +689,7 @@ class SSHandler(MetadataHandler):
search_term, remove_punctuation=False
)
res = await self._search_rom(
self.SEARCH_TERM_NORMALIZER.sub(" : ", normalized_search_term),
self.SEARCH_TERM_NORMALIZER.sub(" - ", normalized_search_term),
platform_ss_id,
)

View File

@@ -610,7 +610,7 @@ async def scan_rom(
)
)
):
# Use Hasheous match to get the IGDB ID
# Use Hasheous match to get the RA ID
h_ra_id = hasheous_rom.get("ra_id")
if h_ra_id:
log.debug(