优化歌词解析
parent
7486a99494
commit
674a3a0a3f
|
@ -110,10 +110,15 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
if (lrcT.length && lrc.length > lrcT.length) {
|
||||
if (lrcT.length) {
|
||||
if (lrc.length * 0.4 < lrcT.length) { // 翻译数量需大于歌词数量的0.4倍,否则认为没有翻译
|
||||
const tItem = lrc.pop()
|
||||
tItem.time = lrc[lrc.length - 1].time
|
||||
lrcT.push(tItem)
|
||||
} else {
|
||||
lrc = arr
|
||||
lrcT = []
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue