feat(sdk): 新增咪咕/千千/JOOX/哔哩哔哩/5sing/Apple Music 六平台
平台注册表由 9 个扩到 15 个,同时补齐 sdk/types.ts 的类型与 OpenAPI 文档里的能力位声明。 - migu:命中 Z3D/I3D 加密候选时不返回直链,改由服务端解密代理出流, SDK 侧只负责登记票据,避免客户端拿到无法播放的密文 - apple:只提供 preview 试听片段(完整曲为 DRM),标 noAggregate 排除在跨平台精确匹配之外,防止用它顶掉其它平台的可播结果 - 其余平台按既有 PlatformModule 约定实现搜索/专辑/歌单/歌词 为什么合并成一次提交:六平台共用同一份注册表与能力位声明, 拆开会产生互相引用、单独无法通过类型检查的中间态。
This commit is contained in:
1 parent
47ce651f46
commit
33b96f92c4
54 files changed
+6161
-5
No files matched your search
@@ -272,6 +272,12 @@ export const COMPONENT_SCHEMAS = {
|
||||
songList: { type: 'boolean' },
|
||||
singer: { type: 'boolean', description: '支持歌手接口(/singer/:source/:id)' },
|
||||
album: { type: 'boolean', description: '支持专辑接口(/album/:source/:id)' },
|
||||
albumSearch: { type: 'boolean', description: '支持专辑搜索(/album/:source/search/:keyword)' },
|
||||
playlist: { type: 'boolean', description: '支持歌单详情(/playlist/:source/:id)' },
|
||||
playlistSearch: { type: 'boolean', description: '支持歌单搜索' },
|
||||
playlistCategories: { type: 'boolean', description: '支持歌单分类' },
|
||||
parse: { type: 'boolean', description: '支持链接解析(/parse/:source)' },
|
||||
userPlaylist: { type: 'boolean', description: '支持个人歌单(/user-playlist/:source)' },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
@@ -285,6 +291,87 @@ export const COMPONENT_SCHEMAS = {
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
PlaylistSummary: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: { type: 'string', description: '歌单/专辑 id' },
|
||||
name: { type: 'string' },
|
||||
cover: { type: 'string' },
|
||||
trackCount: { type: 'integer' },
|
||||
playCount: { type: 'integer' },
|
||||
creator: { type: 'string' },
|
||||
description: { type: 'string' },
|
||||
link: { type: 'string' },
|
||||
source: { type: 'string' },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
PlaylistSearchResult: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
list: { type: 'array', items: ref('PlaylistSummary') },
|
||||
total: { type: 'integer' },
|
||||
page: { type: 'integer' },
|
||||
limit: { type: 'integer' },
|
||||
source: { type: 'string' },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
PlaylistDetailResult: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
source: { type: 'string' },
|
||||
info: ref('AlbumInfo'),
|
||||
list: { type: 'array', items: ref('SongItem') },
|
||||
page: { type: 'integer' },
|
||||
limit: { type: ['integer', 'string', 'null'] },
|
||||
total: { type: ['integer', 'string', 'null'] },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
PlaylistCategoriesResult: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
source: { type: 'string' },
|
||||
list: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: { type: 'string' },
|
||||
name: { type: 'string' },
|
||||
group: { type: 'string' },
|
||||
hot: { type: 'boolean' },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
ParseResult: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
source: { type: 'string' },
|
||||
type: { type: 'string', description: '解析类型:song / album / playlist' },
|
||||
song: ref('SongItem'),
|
||||
playlist: ref('PlaylistSummary'),
|
||||
list: { type: 'array', items: ref('SongItem'), description: 'album/playlist 解析时的曲目' },
|
||||
total: { type: 'integer' },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
UserPlaylistResult: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
list: { type: 'array', items: ref('PlaylistSummary') },
|
||||
page: { type: 'integer' },
|
||||
limit: { type: 'integer' },
|
||||
total: { type: 'integer' },
|
||||
source: { type: 'string' },
|
||||
},
|
||||
additionalProperties: true,
|
||||
},
|
||||
HealthResult: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
|
||||
Reference in new issue
Block a user