diff options
author | Scott Jackson <daneren2005@gmail.com> | 2012-11-10 16:49:22 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2012-11-10 16:49:22 -0800 |
commit | 6172aa62b3f7a3761ce00193f231ce843fb0719e (patch) | |
tree | 2a0f9db0816c26d16f3cc9364fe548fc9ef3e7fd /subsonic-android | |
parent | be92a5b3f34804330e5ce765a945346787b1ad70 (diff) | |
download | dsub-6172aa62b3f7a3761ce00193f231ce843fb0719e.tar.gz dsub-6172aa62b3f7a3761ce00193f231ce843fb0719e.tar.bz2 dsub-6172aa62b3f7a3761ce00193f231ce843fb0719e.zip |
Fixed song menu delete/download/cache running on everything if nothing was previously selected
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java index 6af1b4ce..9561500f 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java @@ -426,11 +426,18 @@ public class SelectAlbumActivity extends SubsonicTabActivity { checkLicenseAndTrialPeriod(onValid); } private void downloadBackground(final boolean save) { + List<MusicDirectory.Entry> songs = getSelectedSongs(); + if(songs.isEmpty()) { + selectAll(true, false); + songs = getSelectedSongs(); + } + downloadBackground(save, songs); + } + private void downloadBackground(final boolean save, final List<MusicDirectory.Entry> songs) { if (getDownloadService() == null) { return; } - final List<MusicDirectory.Entry> songs = getSelectedSongs(); Runnable onValid = new Runnable() { @Override public void run() { @@ -446,8 +453,13 @@ public class SelectAlbumActivity extends SubsonicTabActivity { } private void delete() { + List<MusicDirectory.Entry> songs = getSelectedSongs(); + if(songs.isEmpty()) { + selectAll(true, false); + songs = getSelectedSongs(); + } if (getDownloadService() != null) { - getDownloadService().delete(getSelectedSongs()); + getDownloadService().delete(songs); } } |