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