aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------ServerProxy0
-rw-r--r--src/github/daneren2005/dsub/service/DownloadFile.java7
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java2
3 files changed, 9 insertions, 0 deletions
diff --git a/ServerProxy b/ServerProxy
-Subproject 264e8536a771a7ce49711907797e0e57ff3bcc3
+Subproject 940c61d09a575b3402a21bcb3583189e72a209a
diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java
index b3101e0a..9b7dd45d 100644
--- a/src/github/daneren2005/dsub/service/DownloadFile.java
+++ b/src/github/daneren2005/dsub/service/DownloadFile.java
@@ -227,6 +227,13 @@ public class DownloadFile implements BufferFile {
setPlaying(false);
}
+ @Override
+ public synchronized void onResume() {
+ if(!isFailedMax() && !isDownloading()) {
+ download();
+ }
+ }
+
public synchronized boolean isDownloading() {
return downloadTask != null && downloadTask.isRunning();
}
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index 07b20aad..3637f731 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -1718,6 +1718,8 @@ public class DownloadService extends Service {
Thread.sleep(1000L);
if (isCancelled() || downloadFile.isFailedMax()) {
return null;
+ } else if(!downloadFile.isFailedMax() && !downloadFile.isDownloading()) {
+ checkDownloads();
}
}
doPlay(downloadFile, position, start);