修复酷我源排行榜、歌单详情列表里的歌曲音质匹配问题

pull/96/head
lyswhut 2019-11-30 18:36:44 +08:00
parent ca56089a3e
commit 203dff8d98
3 changed files with 10 additions and 8 deletions

View File

@ -5,3 +5,4 @@
### 修复
- 修复使用酷我源下载歌曲时,当歌曲无封面时下载报错的问题
- 修复酷我源排行榜、歌单详情列表里的歌曲音质匹配问题(原来无论歌曲有无高品、无损都会显示有)

View File

@ -116,36 +116,37 @@ export default {
})
},
filterData(rawList, rawList2) {
// console.log(rawList)
// console.log(rawList.length, rawList2.length)
return rawList.map((item, inedx) => {
let formats = item.formats.split('|')
let types = []
let _types = {}
if (formats.indexOf('MP3128')) {
if (formats.includes('MP3128')) {
types.push({ type: '128k', size: null })
_types['128k'] = {
size: null,
}
}
// if (formats.indexOf('MP3192')) {
// if (formats.includes('MP3192')) {
// types.push({ type: '192k', size: null })
// _types['192k'] = {
// size: null,
// }
// }
if (formats.indexOf('MP3H')) {
if (formats.includes('MP3H')) {
types.push({ type: '320k', size: null })
_types['320k'] = {
size: null,
}
}
// if (formats.indexOf('AL')) {
// if (formats.includes('AL')) {
// types.push({ type: 'ape', size: null })
// _types.ape = {
// size: null,
// }
// }
if (formats.indexOf('ALFLAC')) {
if (formats.includes('ALFLAC')) {
types.push({ type: 'flac', size: null })
_types.flac = {
size: null,

View File

@ -186,19 +186,19 @@ export default {
let formats = item.formats.split('|')
let types = []
let _types = {}
if (formats.indexOf('MP3128')) {
if (formats.includes('MP3128')) {
types.push({ type: '128k', size: null })
_types['128k'] = {
size: null,
}
}
if (formats.indexOf('MP3H')) {
if (formats.includes('MP3H')) {
types.push({ type: '320k', size: null })
_types['320k'] = {
size: null,
}
}
if (formats.indexOf('ALFLAC')) {
if (formats.includes('ALFLAC')) {
types.push({ type: 'flac', size: null })
_types.flac = {
size: null,