diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-01-01 13:19:51 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-01-01 13:19:51 -0800 |
commit | 013b4a554da59ef3b0fc19a0510dd47bb5c5f520 (patch) | |
tree | 2615d55ba772a4b6685a3e9b1738e970e8e55e4b | |
parent | 25874234c23be2fecc49953daec823b336d73963 (diff) | |
download | dsub-013b4a554da59ef3b0fc19a0510dd47bb5c5f520.tar.gz dsub-013b4a554da59ef3b0fc19a0510dd47bb5c5f520.tar.bz2 dsub-013b4a554da59ef3b0fc19a0510dd47bb5c5f520.zip |
#216 Fix Repeat All in Jukebox mode
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/service/JukeboxController.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/JukeboxController.java b/app/src/main/java/github/daneren2005/dsub/service/JukeboxController.java index e9d7cbc8..82ef45e1 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/JukeboxController.java +++ b/app/src/main/java/github/daneren2005/dsub/service/JukeboxController.java @@ -22,6 +22,7 @@ import github.daneren2005.dsub.R; import github.daneren2005.dsub.domain.RemoteStatus; import github.daneren2005.dsub.domain.PlayerState; import github.daneren2005.dsub.domain.RemoteControlState; +import github.daneren2005.dsub.domain.RepeatMode; import github.daneren2005.dsub.service.parser.SubsonicRESTException; import github.daneren2005.dsub.util.Util; @@ -200,11 +201,15 @@ public class JukeboxController extends RemoteController { // Track change? Integer index = jukeboxStatus.getCurrentPlayingIndex(); + int currentPlayingIndex = downloadService.getCurrentPlayingIndex(); if (index != null && index != -1 && index != downloadService.getCurrentPlayingIndex()) { downloadService.setPlayerState(PlayerState.COMPLETED); downloadService.setCurrentPlaying(index, true); if(jukeboxStatus.isPlaying()) { downloadService.setPlayerState(PlayerState.STARTED); + } else if(index == 0 && currentPlayingIndex == downloadService.size() - 1 && downloadService.getRepeatMode() == RepeatMode.ALL) { + // Jukebox does not support any form of auto repeat + start(); } } } |