Restart track when playlist has one song and FF pressed

This commit is contained in:
Andrew Rabert 2019-11-27 18:33:03 -05:00
parent 54d6269a9e
commit 70f6e22be7
1 changed files with 1 additions and 5 deletions

View File

@ -949,7 +949,7 @@ public class DownloadService extends Service {
public synchronized void next(boolean forceStart) { public synchronized void next(boolean forceStart) {
// If only one song, just skip within song // If only one song, just skip within song
if (size() == 1 || (currentPlaying != null && !currentPlaying.isSong())) { if (currentPlaying != null && !currentPlaying.isSong()) {
fastForward(); fastForward();
return; return;
} else if (playerState == PREPARING || playerState == PREPARED) { } else if (playerState == PREPARING || playerState == PREPARED) {
@ -958,10 +958,6 @@ public class DownloadService extends Service {
int index = getCurrentPlayingIndex(); int index = getCurrentPlayingIndex();
int nextPlayingIndex = getNextPlayingIndex(); int nextPlayingIndex = getNextPlayingIndex();
// Make sure to actually go to next when repeat song is on
if (index == nextPlayingIndex) {
nextPlayingIndex++;
}
if (index != -1 && nextPlayingIndex < size()) { if (index != -1 && nextPlayingIndex < size()) {
play(nextPlayingIndex, playerState != PAUSED && playerState != STOPPED && playerState != IDLE || forceStart); play(nextPlayingIndex, playerState != PAUSED && playerState != STOPPED && playerState != IDLE || forceStart);
} }