aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2012-09-28 20:53:52 -0700
committerScott Jackson <daneren2005@gmail.com>2012-09-28 20:53:52 -0700
commit6272b90a851a6d5225cdc32da0fefc59f1e4d91b (patch)
treeddc408886bfb1aac41635611e99447250a3058bd /subsonic-android/src/github
parent681584458f9aecf230544d6fbec6e3a3f5167cb2 (diff)
downloaddsub-6272b90a851a6d5225cdc32da0fefc59f1e4d91b.tar.gz
dsub-6272b90a851a6d5225cdc32da0fefc59f1e4d91b.tar.bz2
dsub-6272b90a851a6d5225cdc32da0fefc59f1e4d91b.zip
Fixed concurrency issue with downloadRecursive
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index a2d63b5c..cf3e9556 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -912,10 +912,12 @@ public class DownloadServiceImpl extends Service implements DownloadService {
} while (i != start);
if((preloaded + 1 == n || preloaded >= Util.getPreloadCount(this)) && !backgroundDownloadList.isEmpty()) {
- for(DownloadFile downloadFile : backgroundDownloadList) {
+ for(i = 0; i < backgroundDownloadList.size(); i++) {
+ DownloadFile downloadFile = backgroundDownloadList.get(i);
if(downloadFile.isWorkDone()) {
// Don't need to keep list like active song list
backgroundDownloadList.remove(downloadFile);
+ i--;
} else {
currentDownloading = downloadFile;
currentDownloading.download();