@@ -252,7 +252,7 @@ const actions = {
252252 if ( state . playedList . length ) {
253253 // 从已播放列表移除播放列表已删除的歌曲
254254 let index
255- for ( index = state . playedList . findIndex ( m => m . songmid === state . playMusicInfo . musicInfo . songmid ) - 1 ; index > - 1 ; index -- ) {
255+ for ( index = state . playedList . findIndex ( m => m . musicInfo . songmid === state . playMusicInfo . musicInfo . songmid ) - 1 ; index > - 1 ; index -- ) {
256256 const playMusicInfo = state . playedList [ index ]
257257 if ( playMusicInfo . listId == currentListId && ! currentList . some ( m => m . songmid === playMusicInfo . musicInfo . songmid ) ) {
258258 commit ( 'removePlayedList' , index )
@@ -322,10 +322,11 @@ const actions = {
322322 }
323323 const currentListId = state . listInfo . id
324324 const currentList = state . listInfo . list
325+ console . log ( currentListId )
325326 if ( state . playedList . length ) {
326327 // 从已播放列表移除播放列表已删除的歌曲
327328 let index
328- for ( index = state . playedList . findIndex ( m => m . songmid === state . playMusicInfo . musicInfo . songmid ) + 1 ; index < state . playedList . length ; index ++ ) {
329+ for ( index = state . playedList . findIndex ( m => m . musicInfo . songmid === state . playMusicInfo . musicInfo . songmid ) + 1 ; index < state . playedList . length ; index ++ ) {
329330 const playMusicInfo = state . playedList [ index ]
330331 if ( playMusicInfo . listId == currentListId && ! currentList . some ( m => m . songmid === playMusicInfo . musicInfo . songmid ) ) {
331332 commit ( 'removePlayedList' , index )
@@ -362,6 +363,7 @@ const actions = {
362363 }
363364 let currentIndex = filteredList . findIndex ( m => m . songmid == currentMusic . songmid )
364365 let nextIndex = currentIndex
366+ console . log ( currentIndex )
365367 switch ( rootState . setting . player . togglePlayMethod ) {
366368 case 'listLoop' :
367369 nextIndex = currentIndex === filteredList . length - 1 ? 0 : currentIndex + 1
0 commit comments