Commit Graph
653 Commits
Author SHA1 Message Date
TIANYAO ZHANG 5c2a9468bd fix(web): preserve playback on invalid queue selections 2026-11-18 18:22:50 +08:00
TIANYAO ZHANG afb1cd7c14 fix(playback): skip blocked providers while advancing mixed queues 2026-11-18 18:22:50 +08:00
TIANYAO ZHANG 0adf21c566 fix(playback): preserve active playback and report actual start failures 2026-11-18 18:21:08 +08:00
TIANYAO ZHANG 23b36e2019 test(bilibili): check recovery request context 2026-11-18 18:21:08 +08:00
TIANYAO ZHANG d0e1422af7 fix(chat): report failed starts for queue and collection commands 2026-11-18 18:21:08 +08:00
TIANYAO ZHANG 1b57af6722 fix(bilibili): rotate CDN hosts during stream recovery 2026-11-18 18:16:47 +08:00
TIANYAO ZHANG fbc12aa11b fix(music): align QQ stream requests and surface provider failures 2026-11-18 18:16:47 +08:00
TIANYAO ZHANG 8ec3dcc405 Merge pull request #198 from ZHANGTIANYAO1/release/v1.16.0-maintenance
chore(release): prepare v1.16.0
v1.16.0
2026-11-18 17:10:09 +08:00
TIANYAO ZHANG bd03cb1c59 fix(release): report the package version in health metadata 2026-11-18 17:09:59 +08:00
TIANYAO ZHANG 5c05eae530 chore(release): prepare v1.16.0 2026-11-18 17:05:31 +08:00
TIANYAO ZHANG c72cd4f233 Merge pull request #185 from jiayuLian/feat/play-url-retry
fix(playback): 播放前重试 + 降音质,不再动不动「无法播放(区域/版权限制)」
2026-11-18 17:04:48 +08:00
TIANYAO ZHANG dc2659628e Merge main into playback retry 2026-11-18 17:02:46 +08:00
TIANYAO ZHANG ad5568187d Merge request log redaction into playback retry 2026-11-18 17:02:45 +08:00
TIANYAO ZHANG cb01cd3049 Merge the reviewed OpenProtocol changes into playback retry 2026-11-18 17:02:45 +08:00
TIANYAO ZHANG db3b6b2f66 Merge pull request #194 from Dr1mH4X/feat/open-protocol
feat: support OpenProtocol
2026-11-18 17:02:20 +08:00
TIANYAO ZHANG d34e249f8a Merge the reviewed music-account changes into playback retry 2026-11-18 17:02:20 +08:00
TIANYAO ZHANG 6546bbd830 Merge pull request #186 from jiayuLian/feat/per-user-music-accounts
feat(music): 每用户音乐账号 + 管理员账号池(个人优先、分配次之、共享兜底)
2026-11-18 17:02:11 +08:00
TIANYAO ZHANG a33fdc1aab Merge pull request #197 from ZHANGTIANYAO1/maint/redact-http-errors
fix(logging): remove request and response data from Axios errors
2026-11-18 17:01:58 +08:00
TIANYAO ZHANG b25cdba161 Merge pull request #196 from ZHANGTIANYAO1/maint/docs-offline-docker-183
docs: explain offline Docker deployment
2026-11-18 17:01:52 +08:00
TIANYAO ZHANG 90a4d80958 fix(playback): cancel stale retries and scope failure messages 2026-11-18 16:57:48 +08:00
TIANYAO ZHANG a47917afb1 Integrate upstream and honor music-account revocations during FM 2026-11-18 16:55:49 +08:00
TIANYAO ZHANG 17b092f2e4 fix(teamspeak): fence chat commands to their connection 2026-11-18 16:53:40 +08:00
TIANYAO ZHANG 0360088710 Merge pull request #182 from jiayuLian/feat/clear-play-history
feat(history): delete single / batch / clear all play history
2026-11-18 16:53:23 +08:00
TIANYAO ZHANG ea05787cb7 Merge remote-tracking branch 'origin/main' into review/185-hardening
# Conflicts:
#	src/music/netease.ts
2026-11-18 16:53:23 +08:00
TIANYAO ZHANG 84e04ee2d2 fix(history): validate selections and follow the active bot 2026-11-18 16:53:13 +08:00
TIANYAO ZHANG 406ecda7d7 fix(playback): keep retry changes independent of proxy settings 2026-11-18 16:52:58 +08:00
TIANYAO ZHANG 4ee1e6f812 fix(logging): omit Axios request and response data 2026-11-18 16:51:43 +08:00
TIANYAO ZHANG 0808cde447 Integrate QQ renewal and enforce music account assignment rules 2026-11-18 16:51:32 +08:00
TIANYAO ZHANG dd8e8c5950 docs: explain offline Docker deployment 2026-11-18 16:50:45 +08:00
YilingandTIANYAO ZHANG 2792a86a6c fix(netease): support configurable realIP and align playback User-Agent (#190)
* Add configurable NetEase real IP in web settings

* Match NetEase playback User-Agent to cookie platform

* fix(netease): keep playback UA aligned with cookie profile

---------

Co-authored-by: TIANYAO ZHANG <88520881+ZHANGTIANYAO1@users.noreply.github.com>
2026-11-18 16:49:36 +08:00
TIANYAO ZHANG 2b657ae338 Merge pull request #191 from NoSetViolin/codex/fix-bilibili-189
fix(bilibili): 修复部分 CDN 403 并保留视频分 P 参数
2026-11-18 16:49:28 +08:00
TIANYAO ZHANG 35fa3a95df Merge pull request #188 from NoSetViolin/zty-main-pr
feat(qq): 支持 QQ 音乐登录凭据自动续期
2026-11-18 16:49:20 +08:00
TIANYAO ZHANG 4f026aa65f fix(open-protocol): verify advertised commands and bound replies 2026-11-18 16:47:49 +08:00
TIANYAO ZHANG 568d49f837 Merge pull request #184 from jiayuLian/fix/cookie-normalize
fix(music): cookie 里存的是整条 Set-Cookie,导致 /song/url 一律返回 400
2026-11-18 16:47:31 +08:00
TIANYAO ZHANG f2a72e3162 Merge pull request #178 from zbn297427669/fix/upstream-test-declick-ramp
test: catch bot tests up with the de-click transport ramp
2026-11-18 16:45:49 +08:00
TIANYAO ZHANG 9928035282 Merge cookie normalization into QQ session renewal 2026-11-18 16:43:49 +08:00
TIANYAO ZHANG 79e9cd797c fix(bilibili): read the page query from the pasted video link 2026-11-18 16:40:27 +08:00
TIANYAO ZHANG 51debb915c fix(music): handle multiple cookie headers and invalid saved values 2026-11-18 16:39:42 +08:00
Dr1mH4X 066f12d91f test(open-protocol): remove leftover slash assertion and formatting diff for PR 2026-11-15 12:20:00 +08:00
Dr1mH4X 69b311283a fix(open-protocol): restore prefix-only command parsing and declare command_prefix in list_ack 2026-11-15 12:14:05 +08:00
Dr1mH4X 263c1ba6da feat(open-protocol): add OpenProtocol v1 discovery and slash-command support 2026-11-14 18:43:00 +08:00
NoSetViolin b7779ab108 fix(bilibili): preserve video pages and CDN playback headers 2026-11-12 18:07:52 +09:00
jiayuLian 97ee05f1ef tune(playback): spend two requests on -460, not three with a 7.5s tail
The risk-control branch grew its delay per attempt (2.5s, then 7.5s) on the
assumption that a blocked IP unlocks on a timer. Measured behaviour says
otherwise: six back-to-back 128k requests from a blocked host answered
-460, -460, -460, -460, 200 — it lets a few through after a while, it does not
unlock at a fixed moment. So the third attempt mostly bought silence: five
requests and ~4s worst case for the same "still blocked".

Cap the whole risk-controlled budget at two requests (one retry after 2.5s)
and skip the quality ladder in that state, which -460 ignores anyway. Worst
case drops to 2.5s, and when it still fails the message now names the wait
(「约 5 秒后再试」) instead of 「请稍后重试」 — a spinner cannot be acted on, a
number can.
2026-11-11 22:44:15 +08:00
jiayuLian 91b2533176 fix(qq): import the running shared cookie into the account pool
`import-shared` read the cookie from qq.json, which is only the on-disk
copy. After #188 renews credentials through the managed session that file
goes stale, so this route would seed the pool with a dead cookie.

Prefer the running QQ provider's in-memory cookie and fall back to the
cookie store when no QQ provider is mounted (tests that only register
netease keep the old behaviour). Two regressions: the rotated cookie wins
over the file copy, and a provider without a login 409s instead of
creating a dead row.
2026-11-11 22:35:27 +08:00
jiayuLian 178935a63d fix(playback): give every failure a cause, not just the retried ones
resolveAndPlay recorded lastPlayFailure only when the retry budget was
exhausted. Every early return (bot offline, local audio disabled) and the
outer catch left it null, so the web route fell back to the catch-all
「区域/版权限制」 for causes that have nothing to do with copyright.

Also move the bilibili detail lookup inside its own try: it is metadata
only, and an upstream 4xx there aborted the resolve before the retry
budget could even start.
2026-11-11 22:19:58 +08:00
NoSetViolin c3d06cb09a fix(qq): preserve login and playback key expiry 2026-11-11 11:09:42 +09:00
NoSetViolin 72e0d3a439 feat(qq): renew music sessions automatically 2026-11-09 23:07:45 +09:00
jiayuLian d2c44ed256 fix(playback): stop walking the quality ladder once -460 hits
-460 is NetEase refusing the caller's IP, not a property of the track, so
asking for a lower quality cannot succeed — it only adds another
RISK_CONTROL_BACKOFF_MS of silence before the same error surfaces. With the
default budget (2 retries + 2 NetEase fallback levels) a blocked host spent
~17s before the user saw anything, which is worse than the instant failure
this replaced. Bail out as soon as the phase changes instead.
2026-11-09 20:13:39 +08:00
jiayuLian d8a8574323 tune(playback): -460 backoff 800ms -> 2500ms, matching the observed risk-control window 2026-11-08 19:34:17 +08:00
jiayuLian 2daae59014 feat(music): optional outbound proxy for the NetEase sidecar
The -460 documented in the previous commit has no code-level fix: NetEase
decides by IP, so a cloud-datacenter host gets refused regardless of account,
quality or retry budget. The only real remedy is to let the request leave from
somewhere else.

The sidecar already supports that, and nobody had noticed: `NeteaseCloudMusicApi`
reads a `proxy` REQUEST PARAMETER and tunnels through it itself
(`util/request.js`, via the `tunnel` package — `httpOverHttp`/`httpsOverHttp`).
So this needs **no new dependency, no global-agent patching, and no change to
how the sidecar is started**. It is one string carried on the calls we already
make.

What was added:

- `NeteaseProvider.setProxy()` / `getProxy()`. The value goes into
  `requestParams`, a single getter that already existed for the cookie — which
  is why all ~20 call sites (search, playlist, album, artist, lyric, playback)
  pick it up without touching each one again.
- `config.musicProxy` (default `""` = direct, i.e. exactly the old behaviour).
  Only `http(s)://host[:port]` is accepted; anything else falls back to direct
  rather than silently breaking every music request.
- `index.ts` reads it, falls back to `HTTPS_PROXY`/`HTTP_PROXY` from the
  environment, and logs `NetEase requests will go through a proxy` with the
  credentials redacted.

Deliberate limits:

- Only HTTP proxies. The sidecar implements this with a CONNECT tunnel, so a
  `socks5://` value would be parsed and then fail. Documented on the setter.
- Audio is NOT proxied. The player pulls the mp3 from NetEase's CDN with ffmpeg,
  which knows nothing about this setting. If a deployment needs those requests
  to share the API's egress IP, it needs a network-level route, not this option.
- Config wins over the environment: a container-wide `HTTPS_PROXY` set for
  unrelated tools must not silently reroute music traffic.

6 new tests: no parameter by default, carried on every call once set, carried on
the playback call specifically, kept alongside the cookie, blank means direct,
values are trimmed.

This is additive and off by default — merging it changes nothing until someone
sets `musicProxy`.
2026-11-08 11:21:37 +00:00