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