From 30c6d3853e1d971a86f83604f8f898a291efa9e0 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Fri, 22 Nov 2013 16:52:59 -0800 Subject: Download new songs in playlist in order --- src/github/daneren2005/dsub/service/sync/PlaylistSyncAdapter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/github/daneren2005/dsub/service/sync/PlaylistSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/PlaylistSyncAdapter.java index e689f0c9..0047b997 100644 --- a/src/github/daneren2005/dsub/service/sync/PlaylistSyncAdapter.java +++ b/src/github/daneren2005/dsub/service/sync/PlaylistSyncAdapter.java @@ -28,6 +28,7 @@ import android.content.SyncResult; import android.os.Bundle; import github.daneren2005.dsub.domain.MusicDirectory; import github.daneren2005.dsub.domain.Playlist; +import github.daneren2005.dsub.service.DownloadFile; import github.daneren2005.dsub.util.Util; /** @@ -54,8 +55,8 @@ public class PlaylistSyncAdapter extends SubsonicSyncAdapter { for(MusicDirectory.Entry entry: playlist.getChildren()) { DownloadFile file = new DownloadFile(context, entry, true); - if(!file.isSaved()) { - // TODO: Figure something out to download these one at a time! + while(!file.isSaved() && !file.isFailedMax()) { + file.downloadNow(); } } } -- cgit v1.2.3