A 429 from the Audible API reads as "no metadata" to every caller
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 901
- Fork
- 70
- Merge trung bình
- 16 giờ 27 phút
- Pull request đã merge (30 ngày)
- 60
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Listenarrs/Listenarr
-
Search button on a book does not retry without the author when the full query finds nothingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Listenarrs/Listenarr#1173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Listenarrs/Listenarr#1133 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Listenarrs/Listenarr#1128 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add New's search splits a title that contains "Series:", "Author:"… as if they were search keywordsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Listenarrs/Listenarr#1127 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Listenarrs/Listenarr#971 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Listenarrs/Listenarr
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
conductor-oss/csharp-sdk#183 ·
-
CreateNewLangProj throws when the default analysis writing system's ICU locale differs from its tagĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
unoplatform/uno#26555 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
CactuseSecurity/firewall-orchestrator#5739 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày