diff options
-rw-r--r-- | src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java | 2 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java index a12d789d..ef17cf5d 100644 --- a/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java +++ b/src/github/daneren2005/dsub/service/sync/MostRecentSyncAdapter.java @@ -66,7 +66,7 @@ public class MostRecentSyncAdapter extends SubsonicSyncAdapter { for(MusicDirectory.Entry album: albumList.getChildren()) {
if(!syncedList.contains(album.getId())) {
try {
- downloadRecursively(musicService.getMusicDirectory(album.getId(), album.getTitle(), true, context, null), context);
+ downloadRecursively(musicService.getMusicDirectory(album.getId(), album.getTitle(), true, context, null), context, false);
syncedList.add(album.getId());
updated = true;
} catch(Exception e) {
diff --git a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java index 6eb22be0..c8e050e1 100644 --- a/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java +++ b/src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java @@ -117,18 +117,18 @@ public class SubsonicSyncAdapter extends AbstractThreadedSyncAdapter { } - protected void downloadRecursively(MusicDirectory parent, Context context) throws Exception { + protected void downloadRecursively(MusicDirectory parent, Context context, boolean save) throws Exception { for (MusicDirectory.Entry song: parent.getChildren(false, true)) { if (!song.isVideo()) { - DownloadFile file = new DownloadFile(context, song, true); - while(!file.isSaved() && !file.isFailedMax()) { + DownloadFile file = new DownloadFile(context, song, save); + while(!file.isCompleteFileAvailable() && !file.isFailedMax()) { file.downloadNow(); } } } for (MusicDirectory.Entry dir: parent.getChildren(true, false)) { - downloadRecursively(musicService.getMusicDirectory(dir.getId(), dir.getTitle(), true, context, null), context); + downloadRecursively(musicService.getMusicDirectory(dir.getId(), dir.getTitle(), true, context, null), context, save); } } } |