1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
程序员小墨 2022-10-18 00:37:48 +08:00
parent 95065be3d7
commit 35d911a1f9

View File

@ -94,7 +94,10 @@ async function fetch({ songIdArray, debug = false }) {
// console.log("songAlbumRel, songArtistRel", songAlbumRel, songArtistRel);
// console.log("songInfoList", songInfoList);
await dbUtils.query('INSERT IGNORE INTO song_album_relation (song_id, album_id) VALUES ?', [songAlbumRel]);
if (songInfoList.length == 0) return;
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]);
await dbUtils.query(`
INSERT INTO song (