mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 02:02:09 +08:00
不处理可能存在翻译的歌词
This commit is contained in:
parent
a1b96b55aa
commit
2a367cd75e
@ -1,4 +1,4 @@
|
|||||||
从这个版本起,你可以将桌面歌词拖动到状态栏上,然后将歌词字体调小后配合新增的歌词窗口宽度、行数设置,模拟出状态栏歌词的效果。
|
从这个版本起,你可以将桌面歌词拖动到状态栏上,然后将歌词字体调小后配合新增的歌词窗口宽度、行数设置,模拟出类似状态栏歌词的效果。
|
||||||
|
|
||||||
如果你的设备装有Xposed框架,可以使用状态栏版(详情看GitHub置顶issue),它通过调用第三方Xposed模块【墨•状态栏歌词】的API支持来状态栏歌词(感谢@ftevxk)。
|
如果你的设备装有Xposed框架,可以使用状态栏版(详情看GitHub置顶issue),它通过调用第三方Xposed模块【墨•状态栏歌词】的API支持来状态栏歌词(感谢@ftevxk)。
|
||||||
但考虑到要依赖第三方应用,并且是Xposed模块,预计用的人会比较少,所以暂不考虑将此特性包含在正式版中。
|
但考虑到要依赖第三方应用,并且是Xposed模块,预计用的人会比较少,所以暂不考虑将此特性包含在正式版中。
|
||||||
|
@ -14,6 +14,7 @@ export default {
|
|||||||
|
|
||||||
for (const item of arr) {
|
for (const item of arr) {
|
||||||
if (lrcSet.has(item.time)) {
|
if (lrcSet.has(item.time)) {
|
||||||
|
if (lrc.length < 2) continue
|
||||||
const tItem = lrc.pop()
|
const tItem = lrc.pop()
|
||||||
tItem.time = lrc[lrc.length - 1].time
|
tItem.time = lrc[lrc.length - 1].time
|
||||||
lrcT.push(tItem)
|
lrcT.push(tItem)
|
||||||
@ -24,15 +25,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lrcT.length) {
|
if (lrcT.length > lrc.length * 0.3) {
|
||||||
if (lrc.length * 0.4 < lrcT.length) { // 翻译数量需大于歌词数量的0.4倍,否则认为没有翻译
|
throw new Error('failed')
|
||||||
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
|
||||||
} else {
|
// lrcT.push(tItem)
|
||||||
lrc = arr
|
// } else {
|
||||||
lrcT = []
|
// lrc = arr
|
||||||
}
|
// lrcT = []
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user