容旧版酷我源搜索列表过滤128k音质的bug

This commit is contained in:
lyswhut
2019-10-20 18:20:58 +08:00
parent 5c32160a58
commit 0a5e7c44ff
3 changed files with 13 additions and 3 deletions
+6 -1
View File
@@ -23,7 +23,12 @@ const getters = {
// actions
const actions = {
getUrl({ commit, state }, { musicInfo, type, isRefresh }) {
if (!musicInfo._types[type]) return Promise.reject(new Error('该歌曲没有可播放的音频'))
if (!musicInfo._types[type]) {
// 兼容旧版酷我源搜索列表过滤128k音质的bug
if (!(musicInfo.source == 'kw' && type == '128k')) return Promise.reject(new Error('该歌曲没有可播放的音频'))
// return Promise.reject(new Error('该歌曲没有可播放的音频'))
}
if (urlRequest && urlRequest.cancelHttp) urlRequest.cancelHttp()
if (musicInfo.typeUrl[type] && !isRefresh) return Promise.resolve()
urlRequest = music[musicInfo.source].getMusicUrl(musicInfo, type)