修复歌词解析问题
parent
545ba6521b
commit
ea1d21a3ef
|
@ -195,8 +195,8 @@ export default {
|
||||||
} catch {
|
} catch {
|
||||||
lrcInfo.lxlyric = ''
|
lrcInfo.lxlyric = ''
|
||||||
}
|
}
|
||||||
if (lrcInfo.lxlyric) lrcInfo.lyric = lrcInfo.lyric.replace(lrcTools.rxps.wordTimeAll, '')
|
lrcInfo.lyric = lrcInfo.lyric.replace(lrcTools.rxps.wordTimeAll, '')
|
||||||
// console.log(lrcInfo.lxlyric)
|
// console.log(lrcInfo)
|
||||||
return lrcInfo
|
return lrcInfo
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -108,10 +108,7 @@ export const lrcTools = {
|
||||||
words = ''
|
words = ''
|
||||||
}
|
}
|
||||||
const wordTimes = words.match(this.rxps.wordTimeAll)
|
const wordTimes = words.match(this.rxps.wordTimeAll)
|
||||||
if (!wordTimes) {
|
if (!wordTimes) return
|
||||||
this.isOK = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// console.log(wordTimes)
|
// console.log(wordTimes)
|
||||||
for (const timeStr of wordTimes) {
|
for (const timeStr of wordTimes) {
|
||||||
const result = this.rxps.wordTime.exec(timeStr)
|
const result = this.rxps.wordTime.exec(timeStr)
|
||||||
|
@ -139,6 +136,7 @@ export const lrcTools = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
parse(lrc) {
|
parse(lrc) {
|
||||||
|
// console.log(lrc)
|
||||||
const lines = lrc.split(/\r\n|\r|\n/)
|
const lines = lrc.split(/\r\n|\r|\n/)
|
||||||
const tools = Object.create(this)
|
const tools = Object.create(this)
|
||||||
tools.isOK = true
|
tools.isOK = true
|
||||||
|
|
Loading…
Reference in New Issue