新增设置-播放设置-点击相同列表内的歌曲切歌时是否清空已播放列表

This commit is contained in:
lyswhut
2023-09-05 12:50:16 +08:00
parent eab5e51f66
commit 9a3434b02e
8 changed files with 24 additions and 10 deletions
+2 -1
View File
@@ -222,10 +222,11 @@ const handlePlay = () => {
* @param index 播放的歌曲位置
*/
export const playList = (listId: string, index: number) => {
const prevListId = playInfo.playerListId
setPlayListId(listId)
pause()
setPlayMusicInfo(listId, getList(listId)[index])
clearPlayedList()
if (appSetting['player.isAutoCleanPlayedList'] || prevListId != listId) clearPlayedList()
clearTempPlayeList()
handlePlay()
}