aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github/daneren2005/subphonic/service
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-07-25 19:58:53 -0700
committerScott Jackson <daneren2005@gmail.com>2012-07-25 19:58:53 -0700
commit2e210b2632b0a4c4d90ab4b0961a47f693d0a66f (patch)
tree4c46a8cd26c7b8919fc93bd5f80a3b2cf1e6f165 /subsonic-android/src/github/daneren2005/subphonic/service
parentb3ae86281bcd3f94f4e5f2497dbc2bb1a77803d4 (diff)
downloaddsub-2e210b2632b0a4c4d90ab4b0961a47f693d0a66f.tar.gz
dsub-2e210b2632b0a4c4d90ab4b0961a47f693d0a66f.tar.bz2
dsub-2e210b2632b0a4c4d90ab4b0961a47f693d0a66f.zip
Play Shuffled added to everything with a Play Now option (tombriden)
Diffstat (limited to 'subsonic-android/src/github/daneren2005/subphonic/service')
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/service/DownloadService.java2
-rw-r--r--subsonic-android/src/github/daneren2005/subphonic/service/DownloadServiceImpl.java7
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()) {