修复wy源的歌曲音质匹配问题
							parent
							
								
									354922195f
								
							
						
					
					
						commit
						336b40a102
					
				| 
						 | 
				
			
			@ -4,3 +4,4 @@
 | 
			
		|||
- 修复快捷键设置框内的提示问题
 | 
			
		||||
- 修复在当前正常播放的列表中使用稍后播放功能时,播放完后稍后播放的歌曲后不会恢复原来播放位置播放的问题
 | 
			
		||||
- 修复kw部分歌单无法打开的问题
 | 
			
		||||
- 修复wy源的歌曲音质匹配问题
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,7 @@ export default {
 | 
			
		|||
    return arr.join('、')
 | 
			
		||||
  },
 | 
			
		||||
  filterList({ songs, privileges }) {
 | 
			
		||||
    // console.log(tracks, privileges)
 | 
			
		||||
    // console.log(songs, privileges)
 | 
			
		||||
    const list = []
 | 
			
		||||
    songs.forEach((item, index) => {
 | 
			
		||||
      const types = []
 | 
			
		||||
| 
						 | 
				
			
			@ -38,6 +38,7 @@ export default {
 | 
			
		|||
              size,
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        case 192000:
 | 
			
		||||
        case 128000:
 | 
			
		||||
          if (item.l) {
 | 
			
		||||
            size = sizeFormate(item.l.size)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,8 +24,9 @@ export default {
 | 
			
		|||
        offset: limit * (page - 1),
 | 
			
		||||
      }),
 | 
			
		||||
    })
 | 
			
		||||
    return searchRequest.promise.then(({ body }) =>
 | 
			
		||||
      body && body.code === 200
 | 
			
		||||
    return searchRequest.promise.then(({ body }) => {
 | 
			
		||||
      // console.log(body)
 | 
			
		||||
      return body && body.code === 200
 | 
			
		||||
        ? musicDetailApi.getList(body.result.songs.map(s => s.id)).then(({ list }) => {
 | 
			
		||||
          this.total = body.result.songCount || 0
 | 
			
		||||
          this.page = page
 | 
			
		||||
| 
						 | 
				
			
			@ -41,7 +42,8 @@ export default {
 | 
			
		|||
            },
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        : body)
 | 
			
		||||
        : body
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  getSinger(singers) {
 | 
			
		||||
    let arr = []
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,6 +139,7 @@ export default {
 | 
			
		|||
              size,
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        case 192000:
 | 
			
		||||
        case 128000:
 | 
			
		||||
          if (item.l) {
 | 
			
		||||
            size = sizeFormate(item.l.size)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue