1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

避免重复查库;DISTICT查出来后通过代码去重

This commit is contained in:
2022-10-20 00:45:12 +08:00
parent 0862db5db9
commit e521c139e2
5 changed files with 23 additions and 21 deletions

View File

@@ -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,