feat: 新增音乐流派(Genre)解析与 UI 显示支持 - #307
Open
MasterZack69 wants to merge 1 commit into
Open
MasterZack69 wants to merge 1 commit into
MasterZack69 wants to merge 1 commit into
Conversation
MasterZack69
force-pushed
the
feat/genre-pr
branch
2 times, most recently
from
September 29, 2026 06:22
7ec68af to
d9abc8a
Compare
MasterZack69
force-pushed
the
feat/genre-pr
branch
from
September 29, 2026 06:37
d9abc8a to
9df5a2f
Compare
Author
|
这个 PR 原本同时包含了一个新功能和一个修复,现在我已经把修复部分拆分到了新的 PR #331 |
MasterZack69
marked this pull request as draft
September 29, 2026 06:42
MasterZack69
force-pushed
the
feat/genre-pr
branch
from
September 29, 2026 06:53
9df5a2f to
ee1bf1b
Compare
MasterZack69
marked this pull request as ready for review
September 29, 2026 07:13
This branch has not been deployed
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.
改动类型
是否包含破坏性变更
改动说明
简介
为本地音乐库新增完整的「流派」支持:涵盖元数据解析、持久化入库、查询检索,并在侧边栏、库页面、歌曲列表、播放器与统计页中提供完整展示与交互。
主要改动
1. 元数据与原生层
native/audio-engine:扫描与播放元数据新增genre字段(读取genre/TCON/style标签),同步更新index.d.ts。electron/main/utils/metadata.ts:新增parseGenres与formatGenres:,、;、、、,、|、//、/、&以及NUL等多种分隔符;&(如Singer/Songwriter、R&B),空格永不拆分(如Pop Rock);Rock & Roll、Drum & Bass、Hip Hop/Rap等);(17)),过滤Unknown/Other,并进行大小写不敏感去重。REM GENRE指令的支持。2. 数据库
tracks表新增可空genres列,并配套提供v4 → v5、v5 → v6迁移脚本。getGenreList、getGenreTracks与hasTracksMissingGenres查询;库统计数据新增genreCount。3. IPC 与类型定义
library:getGenres、library:getGenreTracks。Track与MediaInfo增加genres字段。4. 界面与交互
/genres/local列表页与/collection/local/genre/:name详情页(复用现有列表组件)。关联 Issue
未找到相关 Issue
测试情况
pnpm typecheck、pnpm lint、pnpm test均通过。electron/main/utils/metadata.test.ts流派解析单测并通过;cargo test -p audio-engine metadata通过。截图 / 录屏
自查清单
pnpm format,并确认pnpm typecheck、pnpm lint通过pnpm build:native验证;未手写native/*/index.d.tsdev分支提交