修复kw源某些歌曲的歌词提取异常的问题

This commit is contained in:
lyswhut 2021-12-03 23:46:57 +08:00
parent e72be2f424
commit ecd8b09a8d
2 changed files with 7 additions and 11 deletions

View File

@ -1,13 +1,4 @@
### 优化
- 添加应用初始化出错时的错误捕获输出
- 优化歌词自动换源机制
### 修复 ### 修复
- 修复因kw源歌词接口停用导致该源歌词获取失败的问题 - 修复kw源某些歌曲的歌词提取异常的问题
### 其他
- 更新react-native到v0.66.3
- 更新Exoplayer到v2.16.0

View File

@ -21,7 +21,12 @@ export default {
} }
} }
if (lrc.length) { if (lrc.length) {
if ((lrcT.length - lrc.length) > (lrcT.length * 0.1)) { // 翻译比正文多则证明翻译可能有问题,直接将其丢弃
lrc = lrcT
lrcT = []
} else {
lrc.unshift(lrcT.shift()) lrc.unshift(lrcT.shift())
}
} else { } else {
lrc = lrcT lrc = lrcT
lrcT = [] lrcT = []