aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
index 4dc3ae11..27ecbb2c 100644
--- a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
+++ b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
@@ -114,4 +114,19 @@ public class SubsonicSyncAdapter extends AbstractThreadedSyncAdapter {
public void onExecuteSync(Context context, int instance) {
}
+
+ protected void downloadRecursively(MusicDirectory.Entry parent, Context context) {
+ for (MusicDirectory.Entry parent: album.getChildren(false, true)) {
+ if (!song.isVideo()) {
+ DownloadFile file = new DownloadFile(context, song, true);
+ while(!file.isSaved() && !file.isFailedMax()) {
+ file.downloadNow();
+ }
+ }
+ }
+
+ for (MusicDirectory.Entry dir: parent.getChildren(true, false)) {
+ downloadRecursively(musicService.getMusicDirectory(dir.getId(), dir.getTitle(), true, context, null), context);
+ }
+ }
}