'更新'
This commit is contained in:
+2
-1
@@ -2,6 +2,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { API, DOWNLOAD_DIR } = require('./config');
|
||||
const { fetchJSON } = require('./network');
|
||||
const { formatPersonNames } = require('./utils');
|
||||
|
||||
async function fetchLyric(songId) {
|
||||
try {
|
||||
@@ -47,7 +48,7 @@ function parseCredits(lrcText) {
|
||||
const match = line.match(/^([^::]{1,12})\s*[::]\s*(.+)$/);
|
||||
if (!match) continue;
|
||||
const label = match[1].trim();
|
||||
const value = match[2].trim().replace(/\s*\/\s*/g, '/');
|
||||
const value = formatPersonNames(match[2].trim());
|
||||
if (!value) continue;
|
||||
for (const [key, pattern] of Object.entries(labels)) {
|
||||
if (pattern.test(label) && !credits[key]) {
|
||||
|
||||
Reference in New Issue
Block a user