音源API更新 & 其他改动 (#1295)

## API

### kg源

- 增加歌单歌曲flac24bit显示
- 修复酷狗码只能导入500首的问题
- 更新排行榜

### mg源

- 修复搜索不显示时长的问题
- 修复评论加载失败的问题
- 更新排行榜

### tx源

- 增加热门评论图片显示
- 更新排行榜

### wy源

- 更新排行榜

## 其他

- 添加自定义源zlib模块的支持

---------

Co-authored-by: 彭狸花喵 <94218819+helloplhm-qwq@users.noreply.github.com>
Co-authored-by: lyswhut <lyswhut@qq.com>
This commit is contained in:
Folltoshe
2023-04-13 14:32:59 +08:00
committed by GitHub
co-authored by 彭狸花喵 lyswhut
parent d0425fc0d6
commit d970687ebe
32 changed files with 713 additions and 426 deletions
+3 -6
View File
@@ -1,5 +1,5 @@
import { httpFetch } from '../../request'
import musicSearch from './musicSearch'
import { getMusicInfo } from './musicInfo'
import { decrypt } from './mrc'
const mrcTools = {
@@ -75,11 +75,8 @@ const mrcTools = {
},
getMusicInfo(songInfo) {
return songInfo.mrcUrl == null
? musicSearch.search(`${songInfo.name} ${songInfo.singer || ''}`.trim(), 1, { limit: 25 }).then(({ list }) => {
const targetSong = list.find(s => s.songmid == songInfo.songmid)
return targetSong ? { lrcUrl: targetSong.lrcUrl, mrcUrl: targetSong.mrcUrl, trcUrl: targetSong.trcUrl } : Promise.reject('获取歌词失败')
})
: Promise.resolve({ lrcUrl: songInfo.lrcUrl, mrcUrl: songInfo.mrcUrl, trcUrl: songInfo.trcUrl })
? getMusicInfo(songInfo.copyrightId)
: songInfo
},
getLyric(songInfo) {
return {