diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-08-25 20:23:33 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-08-25 20:23:33 -0700 |
commit | 282231d55b4ca3edd210f36aa9f0eb0cc69e0414 (patch) | |
tree | c773bb6cc2d534627b49b059acf8b624b916b9de | |
parent | eccd6310f02b31f070ce74bdd43a031763313db7 (diff) | |
download | dsub-282231d55b4ca3edd210f36aa9f0eb0cc69e0414.tar.gz dsub-282231d55b4ca3edd210f36aa9f0eb0cc69e0414.tar.bz2 dsub-282231d55b4ca3edd210f36aa9f0eb0cc69e0414.zip |
Fix web commit
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 8a9a0f0b..45135fa9 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -783,6 +783,8 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR protected void downloadRecursively(final String id, final String name, final boolean isDirectory, final boolean save, final boolean append, final boolean autoplay, final boolean shuffle, final boolean background, final boolean playNext) {
LoadingTask<Boolean> task = new LoadingTask<Boolean>(context) {
private static final int MAX_SONGS = 500;
+ private boolean playNowOverride = false;
+ private List<Entry> songs;
@Override
protected Boolean doInBackground() throws Throwable {
@@ -806,7 +808,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR Collections.shuffle(root.getChildren());
}
- List<Entry> songs = new LinkedList<Entry>();
+ songs = new LinkedList<Entry>();
getSongsRecursively(root, songs);
DownloadService downloadService = getDownloadService();
@@ -814,8 +816,8 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR if (!songs.isEmpty() && downloadService != null) {
// Conditions for a standard play now operation
if(!append && !save && autoplay && !playNext && !shuffle && !background) {
- playNow(songs);
- return;
+ playNowOverride = true;
+ return false;
}
if (!append) {
@@ -861,6 +863,11 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR @Override
protected void done(Boolean result) {
+ if(playNowOverride) {
+ playNow(songs);
+ return;
+ }
+
warnIfNetworkOrStorageUnavailable();
if(result) {
|