update
This commit is contained in:
@@ -21,9 +21,9 @@ async function getFromDatabase({ albumId }) {
|
||||
}
|
||||
|
||||
// 获取专辑详情
|
||||
async function fetch({ albumId }) {
|
||||
async function fetch({ albumId, debug = false }) {
|
||||
let result = await dbUtils.query('SELECT count(*) as count FROM album WHERE album_id = ?', [albumId]);
|
||||
if (result[0].count > 0) {
|
||||
if (result[0].count > 0 && !debug) {
|
||||
console.log(`数据库中已有数据,跳过 albumId: ${albumId}`);
|
||||
return;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ SELECT
|
||||
FROM
|
||||
album
|
||||
WHERE
|
||||
version = 3 and full_description is null and description like '%专辑《%》,简介:%'
|
||||
full_description is null and description like '%专辑《%》,简介:%'
|
||||
*/
|
||||
async function update({ albumId }) {
|
||||
let result = await dbUtils.query('SELECT count(*) as count FROM album WHERE album_id = ?', [albumId]);
|
||||
|
@@ -21,9 +21,9 @@ async function getFromDatabase({ artistId }) {
|
||||
}
|
||||
|
||||
// 获取音乐人详情
|
||||
async function fetch({ artistId }) {
|
||||
async function fetch({ artistId, debug = false }) {
|
||||
let result = await dbUtils.query('SELECT count(*) as count FROM artist WHERE artist_id = ?', [artistId]);
|
||||
if (result[0].count > 0) {
|
||||
if (result[0].count > 0 && !debug) {
|
||||
console.log(`数据库中已有数据,跳过 artistId: ${artistId}`);
|
||||
return;
|
||||
}
|
||||
|
@@ -23,9 +23,9 @@ async function getFromDatabase({ songId }) {
|
||||
}
|
||||
|
||||
// 获取音乐详情
|
||||
async function fetch({ songId }) {
|
||||
async function fetch({ songId, debug = false }) {
|
||||
let result = await dbUtils.query('SELECT count(*) as count FROM song WHERE song_id = ?', [songId]);
|
||||
if (result[0].count > 0) {
|
||||
if (result[0].count > 0 && !debug) {
|
||||
console.log(`数据库中已有数据,跳过 songId: ${songId}`);
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user