aboutsummaryrefslogtreecommitdiff
path: root/src/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-03-29 21:50:00 -0700
committerScott Jackson <daneren2005@gmail.com>2014-03-29 21:50:00 -0700
commit512ccb7f735249ac55af971d186cad88f9d116df (patch)
tree29fc37cc9037d8371c05955edbb2d963d86024b3 /src/github/daneren2005
parent78fdf4a61fbb455297e89ae025c73862686ea366 (diff)
downloaddsub-512ccb7f735249ac55af971d186cad88f9d116df.tar.gz
dsub-512ccb7f735249ac55af971d186cad88f9d116df.tar.bz2
dsub-512ccb7f735249ac55af971d186cad88f9d116df.zip
#304 Change to shuffle by album
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 6b63e48d..bd0a3f45 100644
--- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -69,6 +69,7 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@@ -688,6 +689,11 @@ public class SubsonicFragment extends Fragment {
else {
root = musicService.getPlaylist(true, id, name, context, this);
}
+
+ if(shuffle) {
+ Collections.shuffle(root.getChildren());
+ }
+
List<MusicDirectory.Entry> songs = new LinkedList<MusicDirectory.Entry>();
getSongsRecursively(root, songs);
return songs;
@@ -725,7 +731,7 @@ public class SubsonicFragment extends Fragment {
}
warnIfNetworkOrStorageUnavailable();
if(!background) {
- downloadService.download(songs, save, autoplay, playNext, shuffle);
+ downloadService.download(songs, save, autoplay, playNext, false);
if(!append) {
Util.startActivityWithoutTransition(context, DownloadActivity.class);
}