feat: Open API 扩展 — 多音源搜索 + 歌单管理 + AI skill#2873
Open
NuSYiXue wants to merge 6 commits into
Open
Conversation
- 5音源搜索:kw/kg/mg/tx/wy,tx/wy通过IPC回调桥接renderer SDK - 搜索参数:dedup/matchSinger/minQuality/order - /playlist/create、/playlist/add、/playlist/list - /playlist/overwrite、/playlist/remove、/playlist/songs - parseBody GBK编码自动回退(iconv-lite) - httpGet gzip/deflate解压 + User-Agent - 设置页音源优先级(openAPI.sourceOrder)
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.
代码改动(9 个文件)
搜索增强
kwkgmgtxwydedup(去重保留最佳音质)、matchSinger(歌手匹配排序)、minQuality(最低音质过滤)、order(音源优先级)播放列表管理
GET /playlists/playlist/create/playlist/addGET /playlist/list/playlist/overwrite/playlist/remove/playlist/songsGET /playlists+/playlist/remove让 AI 可以「查看所有歌单 → 选择删除」,无需猜测 ID。/playlist/list+/playlist/overwrite组合让 AI 可以「读取 → 本地排序/去重 → 覆盖」,实现任意复杂操作。编码修复
parseBody自动检测 GBK 编码回退(iconv-lite)httpGet添加 gzip/deflate/brotli 解压 + 10s 超时 + User-Agent改动文件
src/main/modules/openApi/index.ts 主变更:5源搜索 + 所有新端点
src/main/modules/openApi/ipcSearch.ts 新建,IPC 搜索桥接
src/main/modules/winMain/main.ts sendSearchRequest() 封装
src/common/rendererIpc.ts rendererHandle() / removeHandler()
src/renderer/utils/openApiSearch.ts 新建,renderer 端 IPC handler
src/renderer/main.ts 注册 openApiSearch handler
src/common/types/app_setting.d.ts openAPI.sourceOrder 类型
src/common/defaultSetting.ts 默认值
SettingOpenAPI.vue 设置页 UI
AI 集成(lx-music-api-skill/)
lx-music-api-skill/文件夹包含 AI 助手使用指南和批量操作脚本:--all不过滤翻唱AI 拿到这些端点后能自动完成:搜索原唱 → 过滤翻唱 → 加入歌单 → 排序 → 覆盖,全部通过标准 HTTP 调用。
Closes #2874