mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
更新歌词匹配
This commit is contained in:
parent
7288e2b845
commit
adcbcf1f40
1 changed files with 16 additions and 15 deletions
|
|
@ -316,7 +316,8 @@ export default class BingSunoClient {
|
|||
fs.unlinkSync(videoPath)
|
||||
}, 60000)
|
||||
} else {
|
||||
logger.warn(`${song.title}下载视频失败,仅发送视频链接`)
|
||||
logger.warn(`${song.title}下载视频失败`)
|
||||
await this.reply(`${song.title}下载视频失败`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -623,7 +624,7 @@ export default class BingSunoClient {
|
|||
lines.forEach(line => {
|
||||
// 检查每一行是否包含分段关键词
|
||||
const sectionFound = sectionKeywords.some(keyword => {
|
||||
const regex = new RegExp(`\\[${keyword} \\d+\\]|\\(${keyword} \\d+\\)`, 'i')
|
||||
const regex = new RegExp(`\\[${keyword} \\d+\\]|\\(${keyword} \\d+\\)|\\*\\*${keyword} \\d+\\*\\*`, 'i')
|
||||
return regex.test(line)
|
||||
})
|
||||
// 如果找到第一个分段关键词,开始提取歌词
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue