aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-02-26 07:23:29 -0800
committerScott Jackson <daneren2005@gmail.com>2013-02-26 07:23:29 -0800
commitd443df9b225058921092f932effa17508d2282cf (patch)
tree0e00bc318b349179abb6870c37276a422482f604 /subsonic-android/src
parentbea7c3bf381cba85a8ae4dba4e5978eb386d0062 (diff)
downloaddsub-d443df9b225058921092f932effa17508d2282cf.tar.gz
dsub-d443df9b225058921092f932effa17508d2282cf.tar.bz2
dsub-d443df9b225058921092f932effa17508d2282cf.zip
Fix download then deleting the same file, then not being able to download anything
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadFile.java3
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadFile.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadFile.java
index 59f78252..834b85d9 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadFile.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadFile.java
@@ -317,6 +317,9 @@ public class DownloadFile {
wifiLock.release();
}
new CacheCleaner(context, DownloadServiceImpl.getInstance()).cleanSpace();
+ if(DownloadServiceImpl.getInstance() != null) {
+ ((DownloadServiceImpl)DownloadServiceImpl.getInstance()).checkDownloads();
+ }
}
}
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 266b977b..91a3a5ea 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -1181,7 +1181,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
if (downloadList.isEmpty() && backgroundDownloadList.isEmpty()) {
return;
}
-
+
// Need to download current playing?
if (currentPlaying != null && currentPlaying != currentDownloading && !currentPlaying.isWorkDone()) {
// Cancel current download, if necessary.
@@ -1196,6 +1196,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
// Find a suitable target for download.
else if (currentDownloading == null || currentDownloading.isWorkDone() || currentDownloading.isFailed() && (!downloadList.isEmpty() || !backgroundDownloadList.isEmpty())) {
+ currentDownloading = null;
int n = size();
int preloaded = 0;