1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-10-02 17:37:28 +08:00
parent 93db6371d9
commit 1939398579
10 changed files with 3183 additions and 28 deletions

View File

@@ -90,13 +90,6 @@ async function fetch({ artistId, debug = false }) {
songIds: songIds,
};
// console.log("artistInfo", artistInfo);
dbUtils.query('INSERT IGNORE INTO artist SET ?', {
artist_id: artistInfo.artistId,
title: artistInfo.title,
description: artistInfo.description,
image: artistInfo.image,
pub_date: artistInfo.pubDate,
});
songIds.forEach(function (songId) {
if (isNaN(Number(songId)) || Number(songId) === 0 || isNaN(Number(artistId)) || Number(artistId) === 0)
return;
@@ -105,6 +98,13 @@ async function fetch({ artistId, debug = false }) {
artist_id: artistId,
});
});
dbUtils.query('INSERT IGNORE INTO artist SET ?', {
artist_id: artistInfo.artistId,
title: artistInfo.title,
description: artistInfo.description,
image: artistInfo.image,
pub_date: artistInfo.pubDate,
});
return artistInfo;
}