aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-11-07 21:19:16 -0800
committerScott Jackson <daneren2005@gmail.com>2012-11-07 21:19:16 -0800
commit9bfb05214551150ea69107840a76295f767ec572 (patch)
tree6c2368204a37c1ec6920a5980b5fb88284942688
parent4fe6420d112ce31ba9df4d7652c1b01cd0a533a6 (diff)
downloaddsub-9bfb05214551150ea69107840a76295f767ec572.tar.gz
dsub-9bfb05214551150ea69107840a76295f767ec572.tar.bz2
dsub-9bfb05214551150ea69107840a76295f767ec572.zip
Fixed Play Last not working when nothing is selected
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
index 4d94d0a1..591ae9d6 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
@@ -125,14 +125,13 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
Intent intent;
switch (item.getItemId()) {
case R.id.menu_play_now:
- playNow(false);
+ playNow(false, false);
return true;
case R.id.menu_play_last:
- download(true, false, false, false, false);
- selectAll(false, false);
+ playNow(false, true);
return true;
case R.id.menu_shuffle:
- playNow(true);
+ playNow(true, false);
return true;
case R.id.menu_select:
selectAllOrNone();
@@ -172,16 +171,16 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
return false;
}
- private void playNow(final boolean shuffle) {
+ private void playNow(final boolean shuffle, final boolean append) {
if(getSelectedSongs().size() > 0) {
- download(false, false, true, false, shuffle);
+ download(append, false, !append, false, shuffle);
selectAll(false, false);
}
else {
- playAll(shuffle);
+ playAll(shuffle, append);
}
}
- private void playAll(final boolean shuffle) {
+ private void playAll(final boolean shuffle, final boolean append) {
boolean hasSubFolders = false;
for (int i = 0; i < entryList.getCount(); i++) {
MusicDirectory.Entry entry = (MusicDirectory.Entry) entryList.getItemAtPosition(i);
@@ -193,10 +192,10 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
String id = getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_ID);
if (hasSubFolders && id != null) {
- downloadRecursively(id, false, false, true, shuffle, false);
+ downloadRecursively(id, false, append, !append, shuffle, false);
} else {
selectAll(true, false);
- download(false, false, true, false, shuffle);
+ download(append, false, !append, false, shuffle);
selectAll(false, false);
}
}
@@ -556,7 +555,7 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
boolean playAll = getIntent().getBooleanExtra(Constants.INTENT_EXTRA_NAME_AUTOPLAY, false);
if (playAll && songCount > 0) {
- playAll(getIntent().getBooleanExtra(Constants.INTENT_EXTRA_NAME_SHUFFLE, false));
+ playAll(getIntent().getBooleanExtra(Constants.INTENT_EXTRA_NAME_SHUFFLE, false), false);
}
}
}