File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ export default class {
130
130
if ( shuffle ) {
131
131
this . _shuffleTheList ( ) ;
132
132
}
133
+ // 同步当前歌曲在列表中的下标
134
+ this . current = this . list . indexOf ( this . currentTrackID ) ;
133
135
}
134
136
get reversed ( ) {
135
137
return this . _reversed ;
@@ -892,7 +894,7 @@ export default class {
892
894
if ( autoPlayTrackID === 'first' ) {
893
895
this . _replaceCurrentTrack ( this . list [ 0 ] ) ;
894
896
} else {
895
- this . current = trackIDs . indexOf ( autoPlayTrackID ) ;
897
+ this . current = this . list . indexOf ( autoPlayTrackID ) ;
896
898
this . _replaceCurrentTrack ( autoPlayTrackID ) ;
897
899
}
898
900
}
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ export default {
57
57
this .player .current + 1 ,
58
58
this .player .current + 100
59
59
);
60
- return this .tracks .filter (t => trackIDs .includes (t .id ));
60
+ return trackIDs
61
+ .map (tid => this .tracks .find (t => t .id === tid))
62
+ .filter (t => t);
61
63
},
62
64
playNextList () {
63
65
return this .player .playNextList ;
You can’t perform that action at this time.
0 commit comments