aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-09-25 16:40:43 -0700
committerdaneren2005 <daneren2005@gmail.com>2013-09-25 16:40:43 -0700
commitb77e275ac82edc1477c45eb12c50e8a3d381339f (patch)
tree8a5a72edf7a9fb41b44bf0ff8cf7a138579a6762 /src/github
parent335ea81f49d584dc521e898141f976933106626d (diff)
downloaddsub-b77e275ac82edc1477c45eb12c50e8a3d381339f.tar.gz
dsub-b77e275ac82edc1477c45eb12c50e8a3d381339f.tar.bz2
dsub-b77e275ac82edc1477c45eb12c50e8a3d381339f.zip
downloadBackground checks if song needs work done before adding to queue
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadServiceImpl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index be4378e6..8db1c9cb 100644
--- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -320,7 +320,10 @@ public class DownloadServiceImpl extends Service implements DownloadService {
public synchronized void downloadBackground(List<MusicDirectory.Entry> songs, boolean save) {
for (MusicDirectory.Entry song : songs) {
DownloadFile downloadFile = new DownloadFile(this, song, save);
- backgroundDownloadList.add(downloadFile);
+ if(!downloadFile.isWorkDone() || (downloadFile.shouldSave() && !downloadFile.isSaved())) {
+ // Only add to list if there is work to be done
+ backgroundDownloadList.add(downloadFile);
+ }
}
revision++;