api enable

This commit is contained in:
2026-05-16 22:17:59 +02:00
parent d8b3b3bda3
commit 5812005319
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -21,16 +21,16 @@ def _is_in_grimmory(filename: str, url: str, user: str, password: str) -> bool:
stem = Path(filename).stem
try:
r = requests.get(
url.rstrip("/") + "/komga/api/v1/books",
url.rstrip("/") + "/api/v1/books",
params={"search": stem},
auth=(user, password),
timeout=10,
)
if r.status_code == 200:
return r.json().get("totalElements", 0) > 0
log.warning("Grimmory search returned HTTP %s for '%s'", r.status_code, stem)
log.debug("Grimmory search returned HTTP %s for '%s' — skipping API check", r.status_code, stem)
except Exception as e:
log.warning("Grimmory duplicate check failed for '%s': %s", filename, e)
log.debug("Grimmory duplicate check unavailable for '%s': %s", filename, e)
return False