diff --git a/publish/changeLog.md b/publish/changeLog.md index 2c5d03dc..9066c241 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -15,6 +15,10 @@ - 修复歌单详情页内歌单名字过长时的UI显示问题(#2028) - 修复获取自定义环境音效预设列表逻辑问题 +### 变更 + +- 不再缓存换源歌曲信息 + ### 其他 - 更新 electron 到 v30.5.1 diff --git a/src/renderer/core/music/utils.ts b/src/renderer/core/music/utils.ts index 098c2f96..eb89772b 100644 --- a/src/renderer/core/music/utils.ts +++ b/src/renderer/core/music/utils.ts @@ -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 => { - 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)