mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-03 18:22:08 +08:00
过滤无效歌曲
This commit is contained in:
parent
7f3970b00a
commit
d4b459facc
@ -7,6 +7,7 @@
|
||||
### 修复
|
||||
|
||||
- 修复wy源搜索某些歌曲时第一页之后的歌曲无法加载的问题
|
||||
- 每次启动时过滤无效的歌曲
|
||||
|
||||
### 变更
|
||||
|
||||
|
@ -85,9 +85,13 @@ export const initList = listData => async(dispatch, getState) => {
|
||||
const allList = [...(userList ?? [])]
|
||||
if (loveList) allList.unshift(loveList)
|
||||
if (defaultList) allList.unshift(defaultList)
|
||||
|
||||
// 临时 - 过滤无效歌曲
|
||||
allList.forEach(list => {
|
||||
let isNeedSaveList = false
|
||||
const newList = list.list.filter(musicInfo => {
|
||||
if (!musicInfo) return false
|
||||
|
||||
// PC v1.8.2以前的Lyric
|
||||
if (musicInfo.lxlrc) {
|
||||
delete musicInfo.lxlrc
|
||||
@ -104,7 +108,11 @@ export const initList = listData => async(dispatch, getState) => {
|
||||
|
||||
return !!musicInfo.songmid
|
||||
})
|
||||
if (isNeedSaveList || newList.length != list.length) needSaveLists.push(list)
|
||||
if (newList.length != list.list.length) {
|
||||
list.list = newList
|
||||
isNeedSaveList = true
|
||||
}
|
||||
if (isNeedSaveList) needSaveLists.push(list)
|
||||
})
|
||||
if (needSaveLists.length) saveList(needSaveLists)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user