更新 歌曲换源 机制
This commit is contained in:
@@ -232,6 +232,23 @@ const handlePlay = () => {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放列表内歌曲
|
||||
* @param listId 列表id
|
||||
* @param id 歌曲id
|
||||
*/
|
||||
export const playListById = (listId: string, id: string) => {
|
||||
const prevListId = playInfo.playerListId
|
||||
setPlayListId(listId)
|
||||
// pause()
|
||||
const musicInfo = getList(listId).find(m => m.id == id)
|
||||
if (!musicInfo) return
|
||||
setPlayMusicInfo(listId, musicInfo)
|
||||
if (appSetting['player.isAutoCleanPlayedList'] || prevListId != listId) clearPlayedList()
|
||||
clearTempPlayeList()
|
||||
handlePlay()
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放列表内歌曲
|
||||
* @param listId 列表id
|
||||
|
||||
Reference in New Issue
Block a user