aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 cf3e9556..64e71850 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -349,7 +349,9 @@ public class DownloadServiceImpl extends Service implements DownloadService {
@Override
public synchronized DownloadFile forSong(MusicDirectory.Entry song) {
for (DownloadFile downloadFile : downloadList) {
- if (downloadFile.getSong().equals(song)) {
+ if (downloadFile.getSong().equals(song) &&
+ ((downloadFile.isDownloading() && !downloadFile.isDownloadCancelled() && downloadFile.getPartialFile().exists())
+ || downloadFile.getCompleteFile().exists())) {
return downloadFile;
}
}