update
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user