From de5ea4f0aa99be061da43509d88e1c9d7e289776 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Mon, 17 Jun 2024 12:37:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E9=9F=B3?= =?UTF-8?q?=E6=BA=90=E6=97=B6=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=AD=BB=E5=BE=AA=E7=8E=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/renderer/core/apiSource.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/publish/changeLog.md b/publish/changeLog.md index dfeb6798..bbcb5fb5 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -2,6 +2,7 @@ - 修复 MacOS 下点击 dock 右键菜单的退出按钮时,程序没有退出的问题(#1923) - 修复 OpenAPI 的 `lyricLineAllText` 在切换到无歌词的音乐时内容没有更新的问题(#1925) +- 修复切换音源时可能出现切换死循环的问题 ### 变更 diff --git a/src/renderer/core/apiSource.ts b/src/renderer/core/apiSource.ts index ecdd9ac6..a0611ad8 100644 --- a/src/renderer/core/apiSource.ts +++ b/src/renderer/core/apiSource.ts @@ -43,5 +43,6 @@ export const setUserApi = async(apiId: string) => { if (!window.lx.apiInitPromise[1]) window.lx.apiInitPromise[2](true) } + if (prevId != apiId) return if (apiId != appSetting['common.apiSource']) setApiSource(apiId) }