AudioScrobbler (ListenBrainz): API Compliance (User-agent & Rate Limiting)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read the AudioScrobbler ListenBrainz client and the LMS 9.2 retry handling mentioned in the issue, then trace how completed scrobbles and Now Playing requests are dispatched. Check the ListenBrainz API requirements linked in the issue for User-Agent contact details and rate limits. Done means requests share one-second pacing, 429 responses honor Retry-After with bounded retries, and unsent listens remain available for recovery; the issue notes that a pull request is planned.
索引モデルが issue の本文から書いたものです。
説明
Introduction
When I was trying to add ListenBrainz support to AudioScrobbler last time, I didn't quite get the rate limiting (1 per second) to work properly, and currently, the Retry-After header isn't being honored for 429 errors, nor is playback and scrobbling from multiple players at once being handled.
https://listenbrainz.readthedocs.io/en/latest/users/api/#id1
There is also a more detailed requirement regarding the inclusion of contact information in the User-Agent
https://listenbrainz.readthedocs.io/en/latest/users/api/#id5
https://github.com/metabrainz/listenbrainz-server/commit/eec17f1171f8335704c17b86361e90bc62c7673c
After all, back then the AI couldn't keep track of everything, and for the support of ListenBrainz provided by Lyrion I owe to major refactoring @mherger.
Describe the bug (AI analysis with personal verification)
- When a completed scrobble receives HTTP 429, the error callback leaves the first item in the batch and schedules the same item again. The retry path has no attempt limit and ignores
Retry-After. - Both the success and error paths schedule the next dispatch with
time() + 0.1. The whole-second clock can place that deadline in the past. There is also no shared one-second interval across completed scrobbles and Now Playing. - The client inherits the LMS User-Agent. It identifies the server and version, but carries no maintainer contact. ListenBrainz asks clients to include a contact and keep calls at or below one per second.
To Reproduce (AI analysis with personal verification)
- Use a local HTTP fixture with two queued listens and a fake token. Accept the first listen and return HTTP 429 with
Retry-After: 8for the second. - Observe the next timer deadline and submitted JSON. In an isolated replay through the LMS 9.1.1 response handler, the same second listen was sent again without the eight-second pause. A second 429 repeated the behavior.
- A separate observation from a local 9.1.1 server log showed a completed listen and a Now Playing dispatch 706 ms apart. Both succeeded.
@vysmaty note: In version 9.2, there is a limit of five failed attempts, but this is more of a safety measure.
**Expected behavior **
- Give the ListenBrainz client an explicit User-Agent with its name, version and a maintainer contact URL or email.
- Share a pacing budget across ListenBrainz operations, using a clock with subsecond precision. Start requests at least one second apart and honor server cooldowns before dispatching pending work.
- Bound the retry loop and retain unsent listens so a temporary failure can be recovered without losing the batch.
System Information (please complete the following information):
- Reproduced with LMS 9.1.1. The current 9.2 source adds a five-consecutive-error cap, but still uses the short default interval and inherits the server User-Agent.
Additional context
Thank you for your patience. And thanks for the fix that limits it to 5 attempts—I've had the server get overwhelmed with requests because of a failed scrobble... And I noticed that the issue had been resolved.
I've gone through the above and will prepare a pull request with help of Codex. It will be AI-generated code, but it looks good and passed the tests... and lots of my follow-up questions for quality.
- 主要言語
- Perl
- スター
- 1.8k
- フォーク
- 389
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LMS-Community/slimserver のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 67/100
LMS-Community/slimserver#1742 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
LMS-Community/slimserver#1555 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
LMS-Community/slimserver#1744 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Serve a static FLAC DASH manifest as a FLAC stream対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
LMS-Community/slimserver#1741 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
compatibility
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
LMS-Community/slimserver#1739 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
LMS-Community/slimserver の issue をすべて見る
似ている issue
-
area:cpan-port area:performance bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fglock/PerlOnJava#2230 ·
メンテナーはふだん 1 日以内に返信
-
Make logo .svgオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
larchanka/ppc-code-ai-agent#38 ·
メンテナーはふだん 1 日以内に返信
-
[doc] perlsub wrongly says that `"sub { ... }" creates a new subroutine each time it is executed'オープンdocumentation Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
docs(api): /api/v3/external_sources spec is missing lc and section_title対応中かも @subhwastaken が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
openfoodfacts/openfoodfacts-server#15626 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100