From a0c2a21f81e2af5a03a51e1c25e99fcbe6b07839 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 9 Dec 2013 22:11:30 -0800 Subject: Don't pin recently added syncs --- .../daneren2005/dsub/service/sync/MostRecentSyncAdapter.java | 2 +- src/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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); } } } -- cgit v1.2.3