修复wy源的歌曲音质匹配问题

pull/486/head
lyswhut 2021-05-15 17:27:25 +08:00
parent 354922195f
commit 336b40a102
5 changed files with 14 additions and 9 deletions

View File

@ -4,3 +4,4 @@
- 修复快捷键设置框内的提示问题 - 修复快捷键设置框内的提示问题
- 修复在当前正常播放的列表中使用稍后播放功能时,播放完后稍后播放的歌曲后不会恢复原来播放位置播放的问题 - 修复在当前正常播放的列表中使用稍后播放功能时,播放完后稍后播放的歌曲后不会恢复原来播放位置播放的问题
- 修复kw部分歌单无法打开的问题 - 修复kw部分歌单无法打开的问题
- 修复wy源的歌曲音质匹配问题

View File

@ -191,12 +191,12 @@ const getters = {
// actions // actions
const actions = { const actions = {
async getUrl({ commit, state }, { musicInfo, type, isRefresh, onToggleSource = () => {} }) { async getUrl({ commit, state }, { musicInfo, type, isRefresh, onToggleSource = () => {} }) {
if (!musicInfo._types[type]) { // if (!musicInfo._types[type]) {
// 兼容旧版酷我源搜索列表过滤128k音质的bug // // 兼容旧版酷我源搜索列表过滤128k音质的bug
if (!(musicInfo.source == 'kw' && type == '128k')) throw new Error('该歌曲没有可播放的音频') // if (!(musicInfo.source == 'kw' && type == '128k')) throw new Error('该歌曲没有可播放的音频')
// return Promise.reject(new Error('该歌曲没有可播放的音频')) // // return Promise.reject(new Error('该歌曲没有可播放的音频'))
} // }
const cachedUrl = await getStoreMusicUrl(musicInfo, type) const cachedUrl = await getStoreMusicUrl(musicInfo, type)
if (cachedUrl && !isRefresh) return cachedUrl if (cachedUrl && !isRefresh) return cachedUrl

View File

@ -13,7 +13,7 @@ export default {
return arr.join('、') return arr.join('、')
}, },
filterList({ songs, privileges }) { filterList({ songs, privileges }) {
// console.log(tracks, privileges) // console.log(songs, privileges)
const list = [] const list = []
songs.forEach((item, index) => { songs.forEach((item, index) => {
const types = [] const types = []
@ -38,6 +38,7 @@ export default {
size, size,
} }
} }
case 192000:
case 128000: case 128000:
if (item.l) { if (item.l) {
size = sizeFormate(item.l.size) size = sizeFormate(item.l.size)

View File

@ -24,8 +24,9 @@ export default {
offset: limit * (page - 1), offset: limit * (page - 1),
}), }),
}) })
return searchRequest.promise.then(({ body }) => return searchRequest.promise.then(({ body }) => {
body && body.code === 200 // console.log(body)
return body && body.code === 200
? musicDetailApi.getList(body.result.songs.map(s => s.id)).then(({ list }) => { ? musicDetailApi.getList(body.result.songs.map(s => s.id)).then(({ list }) => {
this.total = body.result.songCount || 0 this.total = body.result.songCount || 0
this.page = page this.page = page
@ -41,7 +42,8 @@ export default {
}, },
} }
}) })
: body) : body
})
}, },
getSinger(singers) { getSinger(singers) {
let arr = [] let arr = []

View File

@ -139,6 +139,7 @@ export default {
size, size,
} }
} }
case 192000:
case 128000: case 128000:
if (item.l) { if (item.l) {
size = sizeFormate(item.l.size) size = sizeFormate(item.l.size)