不再缓存换源歌曲信息
parent
489bbb6902
commit
c1c0311586
|
@ -15,6 +15,10 @@
|
|||
- 修复歌单详情页内歌单名字过长时的UI显示问题(#2028)
|
||||
- 修复获取自定义环境音效预设列表逻辑问题
|
||||
|
||||
### 变更
|
||||
|
||||
- 不再缓存换源歌曲信息
|
||||
|
||||
### 其他
|
||||
|
||||
- 更新 electron 到 v30.5.1
|
||||
|
|
|
@ -2,8 +2,8 @@ import { qualityList } from '@renderer/store'
|
|||
import { assertApiSupport } from '@renderer/store/utils'
|
||||
import musicSdk from '@renderer/utils/musicSdk'
|
||||
import {
|
||||
getOtherSource as getOtherSourceFromStore,
|
||||
saveOtherSource as saveOtherSourceFromStore,
|
||||
// getOtherSource as getOtherSourceFromStore,
|
||||
// saveOtherSource as saveOtherSourceFromStore,
|
||||
getMusicUrl as getStoreMusicUrl,
|
||||
getPlayerLyric as getStoreLyric,
|
||||
} from '@renderer/utils/ipc'
|
||||
|
@ -17,10 +17,10 @@ const getOtherSourcePromises = new Map()
|
|||
export const existTimeExp = /\[\d{1,2}:.*\d{1,4}\]/
|
||||
|
||||
export const getOtherSource = async(musicInfo: LX.Music.MusicInfo | LX.Download.ListItem, isRefresh = false): Promise<LX.Music.MusicInfoOnline[]> => {
|
||||
if (!isRefresh && musicInfo.id) {
|
||||
const cachedInfo = await getOtherSourceFromStore(musicInfo.id)
|
||||
if (cachedInfo.length) return cachedInfo
|
||||
}
|
||||
// if (!isRefresh && musicInfo.id) {
|
||||
// const cachedInfo = await getOtherSourceFromStore(musicInfo.id)
|
||||
// if (cachedInfo.length) return cachedInfo
|
||||
// }
|
||||
let key: string
|
||||
let searchMusicInfo: {
|
||||
name: string
|
||||
|
@ -61,7 +61,7 @@ export const getOtherSource = async(musicInfo: LX.Music.MusicInfo | LX.Download.
|
|||
if (timeout) clearTimeout(timeout)
|
||||
})
|
||||
}).then((otherSource) => {
|
||||
if (otherSource.length) void saveOtherSourceFromStore(musicInfo.id, otherSource)
|
||||
// if (otherSource.length) void saveOtherSourceFromStore(musicInfo.id, otherSource)
|
||||
return otherSource
|
||||
}).finally(() => {
|
||||
if (getOtherSourcePromises.has(key)) getOtherSourcePromises.delete(key)
|
||||
|
|
Loading…
Reference in New Issue