优化本地歌曲换源匹配机制

This commit is contained in:
lyswhut
2024-03-08 11:54:00 +08:00
parent 9d8fe4be06
commit 45fc8c77b6
6 changed files with 40 additions and 36 deletions
+1
View File
@@ -57,6 +57,7 @@ const parseLyric = str => {
export default {
getIntv(interval) {
if (!interval) return 0
let intvArr = interval.split(':')
let intv = 0
let unit = 1
@@ -72,6 +72,7 @@ export default {
return arr.join('、')
},
getIntv(interval) {
if (!interval) return 0
let intvArr = interval.split(':')
let intv = 0
let unit = 1
+1
View File
@@ -100,6 +100,7 @@ const parseTools = {
return str.replace(/^[\S\s]*?LyricContent="/, '').replace(/"\/>[\S\s]*?$/, '')
},
getIntv(interval) {
if (!interval) return 0
if (!interval.includes('.')) interval += '.0'
let arr = interval.split(/:|\./)
while (arr.length < 3) arr.unshift('0')
+1
View File
@@ -126,6 +126,7 @@ const parseTools = {
})
},
getIntv(interval) {
if (!interval) return 0
if (!interval.includes('.')) interval += '.0'
let arr = interval.split(/:|\./)
while (arr.length < 3) arr.unshift('0')