aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-11-22 16:52:59 -0800
committerdaneren2005 <daneren2005@gmail.com>2013-11-22 16:52:59 -0800
commit30c6d3853e1d971a86f83604f8f898a291efa9e0 (patch)
tree5c146e3266a92064acb24b848091dbc94531634c /src/github
parentd560faa5d53c6fb493e75d8017eae8956cb7a242 (diff)
downloaddsub-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.java5
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();
}
}
}