From 2e210b2632b0a4c4d90ab4b0961a47f693d0a66f Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 25 Jul 2012 19:58:53 -0700 Subject: Play Shuffled added to everything with a Play Now option (tombriden) --- .../src/github/daneren2005/subphonic/service/DownloadService.java | 2 +- .../github/daneren2005/subphonic/service/DownloadServiceImpl.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'subsonic-android/src/github/daneren2005/subphonic/service') 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 songs, boolean save, boolean autoplay, boolean playNext); + void download(List 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 songs, boolean save, boolean autoplay, boolean playNext) { + public synchronized void download(List 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 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()) { -- cgit v1.2.3