Commit c1e8936 1 parent 6867e14 commit c1e8936 Copy full SHA for c1e8936
File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ private static int GenerateNextSongId()
140
140
return CurrentPlaylist . Songs [ _currentSongIndex ] ;
141
141
case RepeatMode . Two :
142
142
if ( _currentSongIndex == - 1 ) { // first repeat
143
- _currentSongIndex == - 2 ;
143
+ _currentSongIndex = - 2 ;
144
144
return CurrentPlaylist . Songs [ 0 ] ;
145
145
} else if ( _currentSongIndex == - 2 ) { // second repeat
146
146
_currentSongIndex = 0 ;
@@ -151,6 +151,7 @@ private static int GenerateNextSongId()
151
151
} else { // ShuffleMode.On
152
152
_currentSongIndex = Random . Shared . Next ( CurrentPlaylist . Songs . Count ) ;
153
153
}
154
+ return CurrentPlaylist . Songs [ _currentSongIndex ] ;
154
155
}
155
156
case RepeatMode . All when CurrentPlaylist . ShuffleMode == ShuffleMode . Off :
156
157
_currentSongIndex = ++ _currentSongIndex % CurrentPlaylist . Songs . Count ;
You can’t perform that action at this time.
0 commit comments