mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
fix check issues
This commit is contained in:
@@ -373,7 +373,7 @@ async def _identify_platform(
|
||||
else:
|
||||
log.info(f"{hl(str(len(fs_roms)))} roms found in the file system")
|
||||
|
||||
for fs_roms_batch in batched(fs_roms, 200):
|
||||
for fs_roms_batch in batched(fs_roms, 200, strict=False):
|
||||
rom_by_filename_map = db_rom_handler.get_roms_by_fs_name(
|
||||
platform_id=platform.id,
|
||||
fs_names={fs_rom["fs_name"] for fs_rom in fs_roms_batch},
|
||||
|
||||
@@ -58,7 +58,6 @@ class HasheousHandler(MetadataHandler):
|
||||
method: str = "POST",
|
||||
params: dict | None = None,
|
||||
data: dict | None = None,
|
||||
timeout: int = 120,
|
||||
) -> dict:
|
||||
httpx_client = ctx_httpx_client.get()
|
||||
|
||||
@@ -69,12 +68,11 @@ class HasheousHandler(MetadataHandler):
|
||||
|
||||
try:
|
||||
log.debug(
|
||||
"API request: Method=%s, URL=%s, Params=%s, Data=%s, Timeout=%s",
|
||||
"API request: Method=%s, URL=%s, Params=%s, Data=%s",
|
||||
method,
|
||||
url,
|
||||
params,
|
||||
data,
|
||||
timeout,
|
||||
)
|
||||
|
||||
# Prepare request kwargs
|
||||
@@ -86,7 +84,7 @@ class HasheousHandler(MetadataHandler):
|
||||
"User-Agent": f"RomM/{get_version()}",
|
||||
# "X-Client-API-Key": self.app_api_key,
|
||||
},
|
||||
"timeout": timeout,
|
||||
"timeout": 120,
|
||||
}
|
||||
|
||||
# Add method-specific parameters
|
||||
|
||||
@@ -109,13 +109,12 @@ class PlaymatchHandler:
|
||||
|
||||
return rom_matches
|
||||
|
||||
async def _request(self, url: str, query: dict, timeout=60) -> dict:
|
||||
async def _request(self, url: str, query: dict) -> dict:
|
||||
"""
|
||||
Sends a Request to Playmatch API.
|
||||
|
||||
:param url: The API endpoint URL.
|
||||
:param query: A dictionary containing the query parameters.
|
||||
:param timeout: The timeout for the request in seconds.
|
||||
:return: A dictionary with the json result.
|
||||
:raises HTTPException: If the request fails or the service is unavailable.
|
||||
"""
|
||||
@@ -132,7 +131,7 @@ class PlaymatchHandler:
|
||||
log.debug(
|
||||
"API request: URL=%s, Timeout=%s",
|
||||
url_with_query,
|
||||
timeout,
|
||||
60,
|
||||
)
|
||||
|
||||
headers = {
|
||||
@@ -141,7 +140,7 @@ class PlaymatchHandler:
|
||||
|
||||
try:
|
||||
res = await httpx_client.get(
|
||||
str(url_with_query), headers=headers, timeout=timeout
|
||||
str(url_with_query), headers=headers, timeout=60
|
||||
)
|
||||
res.raise_for_status()
|
||||
return res.json()
|
||||
|
||||
Reference in New Issue
Block a user