diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-08-01 09:45:32 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-08-01 09:45:32 -0700 |
commit | 0749cc7d7d903a76bce7410a5f79555c1ffe9807 (patch) | |
tree | 0edf6cb61a711d066e9f2d8b655d2b1b4203a64a /app/src/main/java/github | |
parent | 7c3e7ebd7938ab05c375f5c64ceb85518b355656 (diff) | |
download | dsub-0749cc7d7d903a76bce7410a5f79555c1ffe9807.tar.gz dsub-0749cc7d7d903a76bce7410a5f79555c1ffe9807.tar.bz2 dsub-0749cc7d7d903a76bce7410a5f79555c1ffe9807.zip |
Fixes #723: Fix Play Next from options menu with nothing selected
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 15 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java | 4 |
2 files changed, 9 insertions, 10 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 05a46b9d..0ac968b7 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -800,7 +800,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section Bundle args = getArguments(); boolean playAll = args.getBoolean(Constants.INTENT_EXTRA_NAME_AUTOPLAY, false); if (playAll && !restoredInstance) { - playAll(args.getBoolean(Constants.INTENT_EXTRA_NAME_SHUFFLE, false), false); + playAll(args.getBoolean(Constants.INTENT_EXTRA_NAME_SHUFFLE, false), false, false); } } @@ -810,20 +810,19 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section if(!songs.isEmpty()) { download(songs, append, false, !append, playNext, shuffle); entryGridAdapter.clearSelected(); - } - else { - playAll(shuffle, append); + } else { + playAll(shuffle, append, playNext); } } - private void playAll(final boolean shuffle, final boolean append) { + private void playAll(final boolean shuffle, final boolean append, final boolean playNext) { boolean hasSubFolders = albums != null && !albums.isEmpty(); if (hasSubFolders && (id != null || share != null || "starred".equals(albumListType))) { - downloadRecursively(id, false, append, !append, shuffle, false); + downloadRecursively(id, false, append, !append, shuffle, false, playNext); } else if(hasSubFolders && albumListType != null) { - downloadRecursively(albums, shuffle, append); + downloadRecursively(albums, shuffle, append, playNext); } else { - download(entries, append, false, !append, false, shuffle); + download(entries, append, false, !append, playNext, shuffle); } } diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java index f6e65c0e..b7478c8a 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -952,7 +952,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR }.execute(); } - protected void downloadRecursively(final List<Entry> albums, final boolean shuffle, final boolean append) { + protected void downloadRecursively(final List<Entry> albums, final boolean shuffle, final boolean append, final boolean playNext) { new RecursiveLoader(context) { @Override protected Boolean doInBackground() throws Throwable { @@ -980,7 +980,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR downloadService.clear(); } - downloadService.download(songs, false, true, false, false); + downloadService.download(songs, false, true, playNext, false); if(!append) { transition = true; } |