fix(enrichment): POST the AcoustID lookup instead of GET

A Chromaprint fingerprint is multi-KB (a 3.5-min track ≈ 3.5k chars), so
sending it as a GET query param overflows the request URL for longer songs and
fails spuriously. AcoustID accepts the same params form-encoded — POST them.
This commit is contained in:
ChrisBeWithYou
2026-07-04 07:13:42 -05:00
parent 4120252f26
commit 5eb334da36
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -6317,9 +6317,13 @@ def _acoustid_lookup(duration: int, fingerprint: str) -> list[dict]:
import requests
_enrich_throttle()
try:
resp = requests.get(
# POST, not GET: a fingerprint is multi-KB (a 3.5-min track is ~3.5k
# chars), so a GET crams it into the URL and a long song overflows the
# server's URL limit → a spurious failure. AcoustID accepts the same
# params form-encoded in the body.
resp = requests.post(
f"{acoustid_match.ACOUSTID_API_ROOT}/lookup",
params={
data={
"client": key, "format": "json",
"meta": acoustid_match.LOOKUP_META,
"duration": duration, "fingerprint": fingerprint,