refactor!: 移除品牌字样,音源改为 sources/ 目录自动加载,脚本不入库

This commit is contained in:
snowy-yang committed 2026-09-16 21:28:50 +08:00
1 parent f548e5990b
commit 5dd0468860
34 files changed
+256 -232

No files matched your search

+4 -4
View File
@@ -11,7 +11,7 @@ const mrcTools = {
parseLyric(str) {
str = str.replace(/\r/g, '')
const lines = str.split('\n')
const lxlrcLines: string[] = []
const yrcLines: string[] = []
const lrcLines: string[] = []
for (const line of lines) {
@@ -40,11 +40,11 @@ const mrcTools = {
})
const wordArr = words.split(this.rxps.wordTime)
const newWords = times.map((time, index) => `${time}${wordArr[index]}`).join('')
lxlrcLines.push(`[${time}]${newWords}`)
yrcLines.push(`[${time}]${newWords}`)
}
return {
lyric: lrcLines.join('\n'),
lxlyric: lxlrcLines.join('\n'),
yrc: yrcLines.join('\n'),
}
},
getText(url, tryNum = 0) {
@@ -67,7 +67,7 @@ const mrcTools = {
})
},
getLrc(url) {
return this.getText(url).then(text => ({ lxlyric: '', lyric: text }))
return this.getText(url).then(text => ({ yrc: '', lyric: text }))
},
getTrc(url) {
if (!url) return Promise.resolve('')