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

This commit is contained in:
lyswhut
2021-05-15 17:27:25 +08:00
parent 354922195f
commit 336b40a102
5 changed files with 14 additions and 9 deletions
+5 -5
View File
@@ -191,12 +191,12 @@ const getters = {
// actions
const actions = {
async getUrl({ commit, state }, { musicInfo, type, isRefresh, onToggleSource = () => {} }) {
if (!musicInfo._types[type]) {
// 兼容旧版酷我源搜索列表过滤128k音质的bug
if (!(musicInfo.source == 'kw' && type == '128k')) throw new Error('该歌曲没有可播放的音频')
// if (!musicInfo._types[type]) {
// // 兼容旧版酷我源搜索列表过滤128k音质的bug
// 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)
if (cachedUrl && !isRefresh) return cachedUrl