From c1ddabbecfb99af2eacfcb7ef9991264453ae4fb Mon Sep 17 00:00:00 2001 From: kenmingwang1234 Date: Mon, 12 Sep 2022 00:07:27 +0800 Subject: [PATCH] BugFix: QQ Lyric API update --- src/utils/Data.js | 6 +++--- webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/Data.js b/src/utils/Data.js index 8795edec..94030d54 100644 --- a/src/utils/Data.js +++ b/src/utils/Data.js @@ -20,7 +20,7 @@ const URL_HEADER_GIF = "https://github.com/kenmingwang/azusa-player-lrcs/blob/ma // HEADER GIFs count: https://github.com/kenmingwang/azusa-player-lrcs/tree/main/aziRandomPic const COUNT_HEADER_GIFS = 12 // QQ SongSearch API -const URL_QQ_SEARCH = "https://c.y.qq.com/soso/fcgi-bin/client_search_cp?g_tk=938407465&uin=0&format=json&inCharset=utf-8&outCharset=utf-8¬ice=0&platform=h5&needNewCode=1&w={KeyWord}&zhidaqu=1&catZhida=1&t=0&flag=1&ie=utf-8&sem=1&aggr=0&perpage=20&n=20&p=1&remoteplace=txt.mqq.all&_=1459991037831" +const URL_QQ_SEARCH = "https://c.y.qq.com/splcloud/fcgi-bin/smartbox_new.fcg?key={KeyWord}" // QQ LyricSearchAPI const URL_QQ_LYRIC = "https://i.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg?songmid={SongMid}&g_tk=5381&format=json&inCharset=utf8&outCharset=utf-8&nobase64=1" @@ -170,8 +170,8 @@ export const searchLyricOptions = async (searchKey, setOptions, setLyric) => { } const res = await fetch(URL_QQ_SEARCH.replace("{KeyWord}", searchKey)) const json = await res.json() - const data = json.data.song.list - const slimData = data.map((s, v) => { return { key: s.songmid, songMid: s.songmid, label: v + '. ' + s.songname + ' / ' + s.singer[0].name } }) + const data = json.data.song.itemlist + const slimData = data.map((s, v) => { return { key: s.mid, songMid: s.mid, label: v + '. ' + s.name + ' / ' + s.singer } }) setOptions(slimData) } diff --git a/webpack.config.js b/webpack.config.js index 5cc13da4..a5d15405 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -198,7 +198,7 @@ module.exports = (env) => { host: 'localhost', open: true, // open the browser after server had been started compress: true, - overlay: true, // show compiler errors in the browser + // overlay: true, // show compiler errors in the browser static: path.join(__dirname, 'public'), }, };