1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

分析进度慢的原因

This commit is contained in:
2022-10-18 00:40:39 +08:00
parent 35d911a1f9
commit 1917b17975

View File

@@ -59,6 +59,7 @@ async function fetch({ songIdArray, debug = false }) {
console.error(errors);
return;
}
console.log("请求完成");
// console.log(songResult.body.songs.map(item => JSON.stringify(item)));
let songAlbumRel = [], songArtistRel = [];
@@ -96,6 +97,7 @@ async function fetch({ songIdArray, debug = false }) {
if (songInfoList.length == 0) return;
console.log("插入数据库");
if (songAlbumRel.length > 0)
await dbUtils.query('INSERT IGNORE INTO song_album_relation (song_id, album_id) VALUES ?', [songAlbumRel]);
await dbUtils.query('INSERT IGNORE INTO song_artist_relation (song_id, artist_id) VALUES ?', [songArtistRel]);