From b77e275ac82edc1477c45eb12c50e8a3d381339f Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Wed, 25 Sep 2013 16:40:43 -0700 Subject: downloadBackground checks if song needs work done before adding to queue --- src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/github') 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 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++; -- cgit v1.2.3