diff options
-rw-r--r-- | res/menu/select_album.xml | 12 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 12 |
2 files changed, 21 insertions, 3 deletions
diff --git a/res/menu/select_album.xml b/res/menu/select_album.xml index 1a575d31..fa887c28 100644 --- a/res/menu/select_album.xml +++ b/res/menu/select_album.xml @@ -20,4 +20,16 @@ <item android:id="@+id/menu_show_all" android:title="@string/menu.show_all"/> + + <item + android:id="@+id/menu_download" + android:title="@string/common.download"/> + + <item + android:id="@+id/menu_cache" + android:title="@string/common.pin"/> + + <item + android:id="@+id/menu_delete" + android:title="@string/menu.delete_cache"/> </menu> 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);
|