过滤tx源某些不支持播放的歌曲

This commit is contained in:
lyswhut 2022-02-17 11:12:34 +08:00
parent 19c867c9ff
commit afe0363cd4
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,7 @@
### 新增 ### 新增
- 新增“点击列表里的歌曲时自动切换到当前列表播放”设置,此功能仅对歌单、排行榜有效,默认关闭 - 新增“点击列表里的歌曲时自动切换到当前列表播放”设置,此功能仅对歌单、排行榜有效,默认关闭
### 优化
- 过滤tx源某些不支持播放的歌曲解决播放此类内容会导致意外的问题

View File

@ -32,7 +32,10 @@ export default {
}, },
handleResult(rawList) { handleResult(rawList) {
// console.log(rawList) // console.log(rawList)
return rawList.map(item => { const list = []
rawList.forEach(item => {
if (!item.strMediaMid) return
let types = [] let types = []
let _types = {} let _types = {}
if (item.size128 !== 0) { if (item.size128 !== 0) {
@ -64,7 +67,7 @@ export default {
} }
} }
// types.reverse() // types.reverse()
return { list.push({
singer: this.getSinger(item.singer), singer: this.getSinger(item.singer),
name: item.songname, name: item.songname,
albumName: item.albumname, albumName: item.albumname,
@ -83,8 +86,9 @@ export default {
types, types,
_types, _types,
typeUrl: {}, typeUrl: {},
} })
}) })
return list
}, },
search(str, page = 1, { limit } = {}) { search(str, page = 1, { limit } = {}) {
if (limit == null) limit = this.limit if (limit == null) limit = this.limit