清理列表缓存将同时清理歌词
This commit is contained in:
@@ -1,5 +1,38 @@
|
||||
import { httpFetch } from '../../request'
|
||||
import { linuxapi } from './utils/crypto'
|
||||
// import { decodeName } from '../..'
|
||||
|
||||
// const parseLyric = (str, lrc) => {
|
||||
// if (!str) return ''
|
||||
|
||||
// str = str.replace(/\r/g, '')
|
||||
|
||||
// let lxlyric = str.replace(/\[((\d+),\d+)\].*/g, str => {
|
||||
// let result = str.match(/\[((\d+),\d+)\].*/)
|
||||
// let time = parseInt(result[2])
|
||||
// let ms = time % 1000
|
||||
// time /= 1000
|
||||
// let m = parseInt(time / 60).toString().padStart(2, '0')
|
||||
// time %= 60
|
||||
// let s = parseInt(time).toString().padStart(2, '0')
|
||||
// time = `${m}:${s}.${ms}`
|
||||
// str = str.replace(result[1], time)
|
||||
|
||||
// let startTime = 0
|
||||
// str = str.replace(/\(0,1\) /g, ' ').replace(/\(\d+,\d+\)/g, time => {
|
||||
// const [start, end] = time.replace(/^\((\d+,\d+)\)$/, '$1').split(',')
|
||||
|
||||
// time = `<${parseInt(startTime + parseInt(start))},${end}>`
|
||||
// startTime = parseInt(startTime + parseInt(end))
|
||||
// return time
|
||||
// })
|
||||
|
||||
// return str
|
||||
// })
|
||||
|
||||
// lxlyric = decodeName(lxlyric)
|
||||
// return lxlyric.trim()
|
||||
// }
|
||||
|
||||
export default songmid => {
|
||||
const requestObj = httpFetch('https://music.163.com/api/linux/forward', {
|
||||
@@ -21,6 +54,7 @@ export default songmid => {
|
||||
return {
|
||||
lyric: body.lrc.lyric,
|
||||
tlyric: body.tlyric.lyric,
|
||||
// lxlyric: parseLyric(body.klyric.lyric),
|
||||
}
|
||||
})
|
||||
return requestObj
|
||||
|
||||
Reference in New Issue
Block a user