Improve anikoto backup search fallback

- prefer the canonical queued title for anikoto-cli backup searches instead of relying only on the ani-cli source query
- retry backup searches with alternate title variants when AniList misses the first lookup
- bump the project version to 0.46.4 and document the fix in the changelog and README
This commit is contained in:
Dymas
2026-07-09 13:39:44 +02:00
parent 897e12e019
commit 34da6b26c5
6 changed files with 111 additions and 78 deletions
+4 -3
View File
@@ -1161,7 +1161,8 @@ def build_job(payload, config):
}
def command_for_job(job, downloader="ani-cli"):
def command_for_job(job, downloader="ani-cli", query_override=None):
search_query = str(query_override or job.get("query") or job.get("title") or "").strip()
if str(downloader or "ani-cli").strip().lower() == "anikoto-cli":
command = [
ANIKOTO_CLI,
@@ -1173,7 +1174,7 @@ def command_for_job(job, downloader="ani-cli"):
command.append("--dub")
else:
command.append("--sub")
command.append(job["query"])
command.append(search_query)
return command
command = [
@@ -1186,5 +1187,5 @@ def command_for_job(job, downloader="ani-cli"):
]
if job["mode"] == "dub":
command.append("--dub")
command.append(job["query"])
command.append(search_query)
return command