mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
[ROMM-2722] Fix matching special chars in ssfr
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user