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

@@ -106,12 +106,6 @@ async function fetch({ songId, debug = false }) {
duration: duration,
};
// console.log("songInfo", songInfo);
dbUtils.query('INSERT IGNORE INTO song SET ?', {
song_id: songInfo.songId,
title: songInfo.title,
image: songInfo.image,
pub_date: songInfo.pubDate,
});
if (albumId != null)
dbUtils.query('INSERT IGNORE INTO song_album_relation SET ?', {
song_id: songInfo.songId,
@@ -123,6 +117,12 @@ async function fetch({ songId, debug = false }) {
artist_id: artistId,
});
});
dbUtils.query('INSERT IGNORE INTO song SET ?', {
song_id: songInfo.songId,
title: songInfo.title,
image: songInfo.image,
pub_date: songInfo.pubDate,
});
return songInfo;
}