避免重复查库;DISTICT查出来后通过代码去重
This commit is contained in:
@@ -63,6 +63,7 @@ async function fetch({ songId, debug = false }) {
|
||||
|
||||
if (typeof lyric == "undefined") {
|
||||
// 这首歌爬song的时候还在,但是现在不在了
|
||||
// 这里数据丢了不要紧,所以不加await
|
||||
dbUtils.query('INSERT IGNORE INTO lyric SET ?', {
|
||||
song_id: songId,
|
||||
lyric: '',
|
||||
@@ -77,6 +78,7 @@ async function fetch({ songId, debug = false }) {
|
||||
version: lyric.version,
|
||||
};
|
||||
// console.log("lyricInfo", lyricInfo);
|
||||
// 这里数据丢了不要紧,所以不加await
|
||||
dbUtils.query('INSERT IGNORE INTO lyric SET ?', {
|
||||
song_id: lyricInfo.songId,
|
||||
lyric: lyricInfo.lyric,
|
||||
|
Reference in New Issue
Block a user