diff options
Diffstat (limited to 'subsonic-android/src/github/daneren2005/subphonic/service')
-rw-r--r-- | subsonic-android/src/github/daneren2005/subphonic/service/DownloadService.java | 2 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/subphonic/service/DownloadService.java b/subsonic-android/src/github/daneren2005/subphonic/service/DownloadService.java index f6b5b3ee..58b9e8e8 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/service/DownloadService.java +++ b/subsonic-android/src/github/daneren2005/subphonic/service/DownloadService.java @@ -32,7 +32,7 @@ import github.daneren2005.subphonic.domain.RepeatMode; */ public interface DownloadService { - void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext); + void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle); void setShufflePlayEnabled(boolean enabled); diff --git a/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java index aec2963d..c7256a84 100644 --- a/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java +++ b/subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java @@ -179,7 +179,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { } @Override - public synchronized void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext) { + public synchronized void download(List<MusicDirectory.Entry> songs, boolean save, boolean autoplay, boolean playNext, boolean shuffle) { shufflePlay = false; int offset = 1; @@ -204,6 +204,9 @@ public class DownloadServiceImpl extends Service implements DownloadService { revision++; } updateJukeboxPlaylist(); + + if(shuffle) + shuffle(); if (autoplay) { play(0); @@ -223,7 +226,7 @@ public class DownloadServiceImpl extends Service implements DownloadService { } public void restore(List<MusicDirectory.Entry> songs, int currentPlayingIndex, int currentPlayingPosition) { - download(songs, false, false, false); + download(songs, false, false, false, false); if (currentPlayingIndex != -1) { play(currentPlayingIndex, false); if (currentPlaying.isCompleteFileAvailable()) { |