A 429 from the Audible API reads as "no metadata" to every caller
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with MetadataRegistrationExtensions.cs and AudibleApiClient.cs to trace how HTTP failures and status codes are handled; then inspect the cited callers in the rescan, ASIN lookup, and title-search workflows. Compare TorrentFileDownloader.cs:183-195 for the existing Retry-After approach. Done when a throttled Audible response is distinguishable from missing metadata and can be retried or deferred without changing the separate rescan cooldown behavior.
由索引模型根据 Issue 内容生成。
描述
All line references are at a630572e.
What a user sees
A book that exists on Audible comes back "No metadata found using the available identifiers." from a rescan, and the same ASIN works a minute later. It shows up during a burst of lookups rather than on a single one. The only trace is one warning line from the HTTP client naming the status code. Nothing downstream says the provider throttled us, so the symptom is identical to a book that has no catalog entry at all.
The code path
AudibleService gets its typed HttpClient with a Polly policy built from HandleTransientHttpError (listenarr.infrastructure/DependencyInjection/Metadata/MetadataRegistrationExtensions.cs:25-29). That extension covers HttpRequestException, 5xx and 408, not 429, so a throttled request is never retried.
That same client is handed to AudibleApiClient (listenarr.application/Metadata/Audible/AudibleService.cs:44), where any non-success status logs a warning and returns null (AudibleApiClient.cs:83-87), so the status code stops there.
Callers then read null as absence:
LibraryMetadataRescanWorkflow.cs:169callsGetMetadataAsync; null becomes a 404 carrying that message at :289-291.AsinLookupService.cs:115-118turns null straight into the string "Metadata not found".SearchByTitleWorkflow.cs:103-109logs "returned null" and falls through to intelligent search.
Why it matters
AudibleService.cs:177-182 fetches metadata per candidate in a loop, and the refresh and monitoring paths sweep many books in one pass, so bursts are routine. Under throttling a whole sweep reports nothing found.
Worth keeping apart from this: the rescan endpoint emits a 429 of its own, a per-actor 15 second cooldown with a Retry-After (LibraryMetadataRescanWorkflow.cs:27, :85 and :92-99), a different mechanism sharing a status code.
What I think the fix looks like
Surface the status instead of flattening it: an exception, or a typed result carrying the status code, so callers can defer rather than record an absence. Then let the policy handle 429 with a Retry-After-aware delay. TorrentFileDownloader.cs:183-195 already does that in this repo and could be the shape to copy.
Before anyone sends a PR: typed result or exception? AudibleApiClient sits in the area #635 proposes reworking, so I would rather not pick for you. Related but distinct: #638 covers 429 on the indexer side.
This is from reading the source. I have not reproduced it against the live Audible API.
Disclosure: drafted with Claude Code at my direction; I read the cited code at the stated commit and reviewed this before posting.
- 主要语言
- C#
- 星标
- 901
- 派生
- 70
- 平均合并
- 16 小时 27 分钟
- 30 天内合并 PR
- 60
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Listenarrs/Listenarr 的其他 Issue
-
Search button on a book does not retry without the author when the full query finds nothing可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
Listenarrs/Listenarr#1173 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Listenarrs/Listenarr#1133 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
Listenarrs/Listenarr#1128 ·
维护者通常 1 天内回复
-
Add New's search splits a title that contains "Series:", "Author:"… as if they were search keywords未关闭
难度 2/5 1-3 小时 新手友好度 88/100
Listenarrs/Listenarr#1127 ·
维护者通常 1 天内回复
-
p3
难度 2/5 1-3 小时 新手友好度 77/100
Listenarrs/Listenarr#971 ·
维护者通常 1 天内回复
查看 Listenarrs/Listenarr 的全部 Issue
相似的 Issue
-
kind/bug
难度 2/5 1-3 小时 新手友好度 78/100
unoplatform/uno#26555 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
CactuseSecurity/firewall-orchestrator#5739 ·
维护者通常 1 天内回复
-
Add File sorts a picked file by VB6's extensions, not the project format's (#4243 follow-up)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭chore project-system small
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
vikramlearning/blazorbootstrap#1388 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
GamaEdtech/gamatrain-back#977 ·
维护者通常 1 天内回复