From 013b4a554da59ef3b0fc19a0510dd47bb5c5f520 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 1 Jan 2016 13:19:51 -0800 Subject: #216 Fix Repeat All in Jukebox mode --- .../main/java/github/daneren2005/dsub/service/JukeboxController.java | 5 +++++ 1 file changed, 5 insertions(+) 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(); } } } -- cgit v1.2.3