From af3b30096d26c699b22660e5072f3f9b79f38d52 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Thu, 5 Dec 2024 12:10:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/core/player/action.ts | 10 +++++----- .../core/useApp/usePlayer/usePreloadNextMusic.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/core/player/action.ts b/src/renderer/core/player/action.ts index 76a892a9..6c0e3eca 100644 --- a/src/renderer/core/player/action.ts +++ b/src/renderer/core/player/action.ts @@ -240,7 +240,7 @@ const handlePlay = () => { export const playList = (listId: string, index: number) => { const prevListId = playInfo.playerListId setPlayListId(listId) - pause() + // pause() setPlayMusicInfo(listId, getList(listId)[index]) if (appSetting['player.isAutoCleanPlayedList'] || prevListId != listId) clearPlayedList() clearTempPlayeList() @@ -256,12 +256,12 @@ const handleToggleStop = () => { const randomNextMusicInfo = { info: null as LX.Player.PlayMusicInfo | null, - index: -1, + // index: -1, } export const resetRandomNextMusicInfo = () => { if (randomNextMusicInfo.info) { randomNextMusicInfo.info = null - randomNextMusicInfo.index = -1 + // randomNextMusicInfo.index = -1 } } @@ -342,13 +342,13 @@ export const getNextPlayMusicInfo = async(): Promise { - pause() + // pause() setPlayMusicInfo(playMusicInfo.listId, playMusicInfo.musicInfo, playMusicInfo.isTempPlay) handlePlay() } diff --git a/src/renderer/core/useApp/usePlayer/usePreloadNextMusic.ts b/src/renderer/core/useApp/usePlayer/usePreloadNextMusic.ts index 58a927c6..650a865e 100644 --- a/src/renderer/core/useApp/usePlayer/usePreloadNextMusic.ts +++ b/src/renderer/core/useApp/usePlayer/usePreloadNextMusic.ts @@ -21,7 +21,7 @@ const initAudio = () => { audio.pause() }) } -const checkMusicUrl = async(url: string) => { +const checkMusicUrl = async(url: string): Promise => { initAudio() return new Promise((resolve) => { const clear = () => {