Skip to content

fix: bound automatic Netease quality fallback on risk-control errors - #22

Draft
nitonitori wants to merge 1 commit into
yichen11818:mainfrom
nitonitori:fix/netease-auto-quality-fallback
Draft

nitonitori wants to merge 1 commit into
yichen11818:mainfrom
nitonitori:fix/netease-auto-quality-fallback

Conversation

@nitonitori

Copy link
Copy Markdown

Automatic Netease playback currently aborts when the initial jymaster request returns HTTP400/code=-460, even when the same authenticated standard request succeeds. Add one bounded standard-quality retry for auto; explicit quality requests keep their requested quality and receive a clear error.

The playback resolver, song-URL endpoint and administrator diagnostic endpoint share this handling. Other HTTP failures are reported as sanitized 502 responses; an exhausted risk-control response is a sanitized 503. Cookie handling and the existing paid-track/trial fallback are preserved.

Validation:

  • Watched the new failure cases reproduce the original HTTPStatusError before implementing the fix.
  • Linux/Python3.11 complete backend regression suite: 80 tests passed.
  • Covers HTTP400 and HTTP200 risk responses, retry limit, explicit quality, unrelated errors, normal high-quality success, playback payloads and existing trial fallback.
  • Read-only live API checks confirmed that authenticated standard quality succeeds for the reported track; no credentials or signed URLs are included in this contribution.
  • No web, voice protocol or dependency changes. Actual audible playback is not asserted by the unit tests.

Closes #20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Netease risk-control errors for automatic playback quality

1 participant