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

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()
}
@@ -5,6 +5,8 @@ dd
base-checkbox(id="setting_player_startup_auto_play" :model-value="appSetting['player.startupAutoPlay']" :label="$t('setting__play_startup_auto_play')" @update:model-value="updateSetting({'player.startupAutoPlay': $event})")
.gap-top
base-checkbox(id="setting_player_save_play_time" :model-value="appSetting['player.isSavePlayTime']" :label="$t('setting__play_save_play_time')" @update:model-value="updateSetting({'player.isSavePlayTime': $event})")
.gap-top
base-checkbox(id="setting_player_auto_clean_played_list" :model-value="appSetting['player.isAutoCleanPlayedList']" :label="$t('setting__play_auto_clean_played_list')" @update:model-value="updateSetting({'player.isAutoCleanPlayedList': $event})")
.gap-top
base-checkbox(id="setting_player_lyric_transition" :model-value="appSetting['player.isShowLyricTranslation']" :label="$t('setting__play_lyric_transition')" @update:model-value="updateSetting({'player.isShowLyricTranslation': $event})")
.gap-top