mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
修复图片更新问题
This commit is contained in:
parent
713eccdca3
commit
3f08e7a7c7
@ -50,7 +50,7 @@ export const getPicUrl = async({ musicInfo, listId, isRefresh, onToggleSource =
|
|||||||
if (!otherSource.length) throw new Error('source not found')
|
if (!otherSource.length) throw new Error('source not found')
|
||||||
return await getOnlineOtherSourcePicUrl({ musicInfos: [...otherSource], onToggleSource, isRefresh }).then(({ url, musicInfo: targetMusicInfo, isFromCache }) => {
|
return await getOnlineOtherSourcePicUrl({ musicInfos: [...otherSource], onToggleSource, isRefresh }).then(({ url, musicInfo: targetMusicInfo, isFromCache }) => {
|
||||||
if (listId) {
|
if (listId) {
|
||||||
// musicInfo.meta.picUrl = url
|
musicInfo.meta.picUrl = url
|
||||||
void updateListMusics([{ id: listId, musicInfo }])
|
void updateListMusics([{ id: listId, musicInfo }])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ export const getMusicUrl = async({ musicInfo, quality, isRefresh, allowToggleSou
|
|||||||
|
|
||||||
// // return Promise.reject(new Error('该歌曲没有可播放的音频'))
|
// // return Promise.reject(new Error('该歌曲没有可播放的音频'))
|
||||||
// }
|
// }
|
||||||
const targetQuality = quality ?? getPlayQuality(settingState.setting['player.highQuality'], musicInfo)
|
const targetQuality = quality ?? getPlayQuality(settingState.setting['player.isPlayHighQuality'], musicInfo)
|
||||||
const cachedUrl = await getStoreMusicUrl(musicInfo, targetQuality)
|
const cachedUrl = await getStoreMusicUrl(musicInfo, targetQuality)
|
||||||
if (cachedUrl && !isRefresh) return cachedUrl
|
if (cachedUrl && !isRefresh) return cachedUrl
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ export const getPicUrl = async({ musicInfo, listId, isRefresh, allowToggleSource
|
|||||||
return await handleGetOnlinePicUrl({ musicInfo, onToggleSource, isRefresh, allowToggleSource }).then(({ url, musicInfo: targetMusicInfo, isFromCache }) => {
|
return await handleGetOnlinePicUrl({ musicInfo, onToggleSource, isRefresh, allowToggleSource }).then(({ url, musicInfo: targetMusicInfo, isFromCache }) => {
|
||||||
// picRequest = null
|
// picRequest = null
|
||||||
if (listId) {
|
if (listId) {
|
||||||
// musicInfo.meta.picUrl = url
|
musicInfo.meta.picUrl = url
|
||||||
void updateListMusics([{ id: listId, musicInfo }])
|
void updateListMusics([{ id: listId, musicInfo }])
|
||||||
}
|
}
|
||||||
// savePic({ musicInfo, url, listId })
|
// savePic({ musicInfo, url, listId })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user