Repository navigation
feat: 完善插件系统并支持独立音源 - #383
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
登录态授权和跨进程数据传递仍有阻断问题,需修复后完成人工安全审查与端到端验证。
2 open findings
What changed in this PR
本 PR 将插件系统统一为按能力注册,接入独立曲库的搜索、播放和队列恢复,并扩展插件与 MCP 共用接口。
主要变更:
- 增加独立插件来源,贯通搜索、播放、歌词和封面解析。
- 扩展权限管理、平台接口及播放控制,修复插件生命周期和 Cookie 行为。
- 重整中英文文档,更新 MCP 参数契约并配置 Agent 文档生成。
| File | Description |
|---|---|
| src/utils/format/shareUrl.ts | 插件集合不提供分享地址 |
| src/stores/plugins.ts | 增加权限管理和指定插件等待 |
| src/settings/categories/plugins.ts | 更新插件设置搜索关键词 |
| src/services/lyric/resolve.ts | 按所属插件解析歌词 |
| src/services/lyric/loader.ts | 增加插件歌曲歌词加载分支 |
| src/services/coverLoader.ts | 按所属插件补充封面 |
| src/services/audioSource.ts | 解析独立插件播放地址 |
| src/pages/Search.vue | 增加插件来源选择与分页搜索 |
| src/i18n/locales/zh-CN.json | 更新中文搜索和权限文案 |
| src/i18n/locales/en-US.json | 更新英文搜索和权限文案 |
| src/core/player/index.ts | 恢复播放前等待所属插件 |
| src/composables/useTrackMenu.ts | 调整插件歌曲菜单及搜索跳转 |
| src/components/settings/custom/PluginList.vue | 移除插件类型分区 |
| src/components/settings/custom/PluginDetailDialog.vue | 增加权限开关 |
| src/components/player/PlayerBar.vue | 隐藏插件歌曲收藏入口 |
| src/components/player/FullPlayer/index.vue | 限制插件歌曲收藏和下载 |
| src/components/list/SongList.vue | 调整插件歌曲列表操作 |
| src/components/layout/NavSearch.vue | 搜索时保留插件来源 |
| shared/types/plugin.ts | 扩展插件能力、权限与接口类型 |
| shared/types/player.ts | 增加插件来源元数据 |
| shared/types/music.ts | 定义共享搜索和播放状态类型 |
| shared/defaults/plugin-api.ts | 提升 API 级别并增加权限默认配置 |
| package.json | 增加文档生成依赖 |
| electron/preload/index.ts | 暴露权限和插件搜索接口 |
| electron/main/services/playerControl.ts | 聚合播放状态查询 |
| electron/main/services/platformApi.ts | 统一平台接口调用 |
| electron/main/services/music/onlineSearch.ts | 复用共享类型并移除搜索缓存写入 |
| electron/main/services/music/index.ts | 提供共享搜索和 Track 校验 |
| electron/main/services/mcp/server.ts | 播放与入队改用完整 Track |
| electron/main/services/mcp/cache.ts | 删除 MCP 曲目缓存 |
| electron/main/plugins/search.ts | 将插件搜索候选转换为 Track |
| electron/main/plugins/router.ts | 菜单调用检查实时权限 |
| electron/main/plugins/registry.ts | 更新权限、设置和运行生命周期管理 |
| electron/main/plugins/playbackBridge.ts | 按事件订阅能力连接播放事件 |
| electron/main/plugins/net.ts | 隔离请求 Cookie 并移除市场类型字段 |
| electron/main/plugins/metadata.ts | 直接使用插件来源候选 |
| electron/main/plugins/loader.ts | 移除类型分类并统一权限解析 |
| electron/main/plugins/host.worker.ts | 扩展宿主调用并保留已注册能力 |
| electron/main/plugins/host.ts | 增加权限门控和新接口分发 |
| electron/main/plugins/host.spec.ts | 验证平台接口转发 |
| electron/main/plugins/host-process.ts | 调整加载取消与稳定心跳处理 |
| electron/main/ipc/plugin.ts | 增加权限、搜索和启动等待入口 |
| electron/main/ipc/apis.ts | 复用平台调用服务 |
| electron/main/core/index.ts | 简化播放事件桥初始化注释 |
| electron/main/apis/netease/index.ts | 支持原始 API 路径并禁用其缓存 |
| docs/types.md | 补充插件来源类型 |
| docs/plugins/update.md | 更新插件更新机制说明 |
| docs/plugins/lx.md | 新增 LX 兼容参考 |
| docs/plugins/development.md | 新增开发流程与 Agent 入口 |
| docs/plugins/changelog.md | 记录插件 API 级别 |
| docs/plugins-usage.md | 更新安装、权限和独立曲库指南 |
| docs/mcp.md | 更新完整 Track 参数说明 |
| docs/en/types.md | 同步英文插件来源类型 |
| docs/en/plugins/update.md | 同步英文更新机制说明 |
| docs/en/plugins/lx.md | 新增英文 LX 兼容参考 |
| docs/en/plugins/index.md | 重整英文架构和权限说明 |
| docs/en/plugins/development.md | 新增英文开发指南 |
| docs/en/plugins/control.md | 扩展英文播放控制参考 |
| docs/en/plugins/changelog.md | 新增英文 API 级别历史 |
| docs/en/plugins-usage.md | 同步英文插件使用指南 |
| docs/en/mcp.md | 同步英文 MCP 参数说明 |
| docs/.vitepress/theme/custom.css | 调整文档搜索按钮颜色变量 |
| docs/.vitepress/config.ts | 重组插件导航并配置 llms 文档生成 |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 统一按注册能力提供功能,并打通独立来源的搜索、播放、队列恢复、歌词和封面。
兼容性变化:MCP 的 play_track 移除 trackId 参数,改传 track;add_to_queue 移除 trackIds,改传 tracks。插件清单不再包含 type,旧脚本中的 @type 不再参与能力判断。
关联 Issue
自查清单