feat: kg 源搜索改用 AndroidFilter 接口并提供 albumAudioId (#2849)
将搜索接口 platform 从 WebFilter 切换到 AndroidFilter,新接口返回
MixSongID(即 album_audio_id),用于后续歌词精确搜索。
- songmid 各处仍保持原取值(Audioid / audio_id)不变,避免影响
既有歌曲 id 与旧收藏/列表数据
- 所有歌曲列表产出点均新增 albumAudioId 字段:
musicSearch(MixSongID)、songList 顶层(album_audio_id)、
songList 详情/leaderboard/musicInfo(audio_group_id / album_audio_id)
- music.d.ts 的 MusicInfoMeta_kg 增加 albumAudioId 字段,
tools.ts 新旧格式双向转换中保留,确保持久化后不丢失
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
21619e72dc
commit
905b2c3c42
Vendored
+1
@@ -58,6 +58,7 @@ declare namespace LX {
|
||||
qualitys: MusicQualityTypeKg[]
|
||||
_qualitys: _MusicQualityTypeKg
|
||||
hash: string // 歌曲hash
|
||||
albumAudioId?: string // 专辑内歌曲ID(MixSongID),用于歌词精确搜索
|
||||
}
|
||||
interface MusicInfo_kg extends MusicInfoBase<'kg'> {
|
||||
meta: MusicInfoMeta_kg
|
||||
|
||||
@@ -35,6 +35,7 @@ export const toNewMusicInfo = (oldMusicInfo: any): LX.Music.MusicInfo => {
|
||||
switch (oldMusicInfo.source) {
|
||||
case 'kg':
|
||||
meta.hash = oldMusicInfo.hash
|
||||
meta.albumAudioId = oldMusicInfo.albumAudioId
|
||||
newInfo.id = oldMusicInfo.songmid + '_' + oldMusicInfo.hash
|
||||
break
|
||||
case 'tx':
|
||||
@@ -79,6 +80,7 @@ export const toOldMusicInfo = (minfo: LX.Music.MusicInfo) => {
|
||||
switch (minfo.source) {
|
||||
case 'kg':
|
||||
oInfo.hash = minfo.meta.hash
|
||||
oInfo.albumAudioId = minfo.meta.albumAudioId
|
||||
break
|
||||
case 'tx':
|
||||
oInfo.strMediaMid = minfo.meta.strMediaMid
|
||||
|
||||
Reference in New Issue
Block a user