From 512ccb7f735249ac55af971d186cad88f9d116df Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Sat, 29 Mar 2014 21:50:00 -0700 Subject: #304 Change to shuffle by album --- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 songs = new LinkedList(); 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); } -- cgit v1.2.3