aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-10-04 18:23:14 -0700
committerScott Jackson <daneren2005@gmail.com>2014-10-04 18:23:14 -0700
commitbe75b266a7c1d44b33b7cc93e39469f61c715999 (patch)
tree956e4cb4a0b1026c28fad1a282ee0ef16d1bd54a /src/github
parent51ffbb23b82287932089881c920203257022eedc (diff)
downloaddsub-be75b266a7c1d44b33b7cc93e39469f61c715999.tar.gz
dsub-be75b266a7c1d44b33b7cc93e39469f61c715999.tar.bz2
dsub-be75b266a7c1d44b33b7cc93e39469f61c715999.zip
Add cache/delete to album only option menus
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
index dce7d004..cb357976 100644
--- a/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java
@@ -895,10 +895,11 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
private void downloadBackground(final boolean save) {
List<Entry> songs = getSelectedSongs();
if(songs.isEmpty()) {
- selectAll(true, false);
- songs = getSelectedSongs();
+ // Get both songs and albums
+ downloadRecursively(id, save, false, false, false, true);
+ } else {
+ downloadBackground(save, songs);
}
- downloadBackground(save, songs);
}
private void downloadBackground(final boolean save, final List<Entry> songs) {
if (getDownloadService() == null) {
@@ -927,6 +928,11 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter
if(songs.isEmpty()) {
selectAll(true, false);
songs = getSelectedSongs();
+
+ // Also delete all directories
+ for(Entry album: albums) {
+ deleteRecursively(album);
+ }
}
if (getDownloadService() != null) {
getDownloadService().delete(songs);