feat: v0.8.0 — dynaudnorm 音量平衡、Discovery 個人化、安全修補、CI - #38
Merged
Conversation
## 音量自動平衡(WS1) - 以 mpv dynaudnorm 濾鏡取代靜態每首歌衰減係數;歌曲內部與歌曲之間忽大忽小 透過 3 秒級高斯平滑即時修正,安靜的歌也會被拉近基準(最大增益 5x) - 移除 music.service getTrackLoudness / queue.service 靜態增益路徑(避免雙重衰減) - 切換開關透過 mpv IPC af set/clr 即時生效,不需重啟播放 - 將既有 VolumeNormalizationControl 接入 PlayerSection 與 MobileNowPlayingSheet ## Discovery 個人化(WS2) - 新增「最近常聽」(近 30 天點播)與「為你推薦」(top-3 種子 + YouTube up-next) 兩個區塊,排在市場內容之前;15 分鐘快取 - 冷啟動修正:無點播紀錄時不渲染空白的熱門點播卡 - DiscoverSection 新增 origin 欄位供前端區分個人化 vs 市場內容 ## 安全修補 + 生產韌性(WS3) - CORS:CORS_ORIGIN 白名單模式;wildcard 時移除 credentials 防止不安全組合 - Dockerfile yt-dlp 加 SHA-256 校驗,防止供應鏈下載篡改 - 新增 GET /api/health 端點 + docker-compose healthcheck - 新增 .env.example、啟動環境變數驗證(src/utils/env.ts) - 修正 SIGINT/SIGTERM 不退出 process 的問題 ## 自建 CI(WS4) - .github/workflows/ci.yml:backend typecheck+test / frontend build / hadolint / dependency-review;ubuntu-latest,不依賴外部設施 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| timeout-minutes: 15 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: oven-sh/setup-bun@v2 |
| timeout-minutes: 5 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: hadolint/hadolint-action@v3.1.0 |
Dependency graph 未在 repo 設定中啟用時 action 會直接報錯。 加上 continue-on-error: true 避免擋住其他 check 均通過的 PR。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本 PR 包含四個工作流
WS1 — 音量自動平衡重構
舊的靜態每首歌衰減係數只在切歌時作用一次,無法修正歌曲內部忽大忽小或安靜歌曲沒有增益的問題。
改動:
dynaudnorm=f=400:g=15:m=5:r=0.8:p=0.9取代靜態路徑;RMS 模式 + 3 秒高斯平滑即時調整增益,歌曲內部與歌曲之間皆有效af set/clr即時生效,不需重新播放music.service.getTrackLoudness、queue.service靜態增益路徑(防止雙重衰減)VolumeNormalizationControl接入桌面PlayerSection與手機MobileNowPlayingSheetWS2 — Discovery 個人化
冷啟動時 TopRequestedRail 會顯示空白;沒有個人化內容,覺得「沒用」。
改動:
DiscoverSection新增origin?: "personal" | "market"WS3 — 安全修補 + 生產韌性
CORS_ORIGIN環境變數白名單;wildcard 模式移除credentials: trueGET /api/health:供 docker-compose healthcheck 與外部監控使用.env.example:列出全部環境變數含說明src/utils/env.ts validateEnvironment()偵測常見設定錯誤,以 warn 提示不中斷server.stop(); process.exit(0)WS4 — 自建精簡 CI
PR #37 依賴 self-hosted runner / Harbor / K8s / Argo CD 等外部設施,不能直接合併。
改動:
.github/workflows/ci.yml:ubuntu-latest — backend typecheck+test / frontend build / hadolint / dependency-review-actiondocker-image.yml不動測試
bun test src/__tests__:222 pass / 0 failbun run typecheck:cleancd frontend && npm run build:clean/api/health回傳version: 0.8.0、CORS wildcard/whitelist 兩種模式行為正確🤖 Generated with Claude Code