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:
+4
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user