diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-11-22 16:52:59 -0800 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-11-22 16:52:59 -0800 |
commit | 30c6d3853e1d971a86f83604f8f898a291efa9e0 (patch) | |
tree | 5c146e3266a92064acb24b848091dbc94531634c /src/github | |
parent | d560faa5d53c6fb493e75d8017eae8956cb7a242 (diff) | |
download | dsub-30c6d3853e1d971a86f83604f8f898a291efa9e0.tar.gz dsub-30c6d3853e1d971a86f83604f8f898a291efa9e0.tar.bz2 dsub-30c6d3853e1d971a86f83604f8f898a291efa9e0.zip |
Download new songs in playlist in order
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/sync/PlaylistSyncAdapter.java | 5 |
1 files 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();
}
}
}
|