aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index b3a989ed..396bfdee 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -1154,6 +1154,16 @@ public class DownloadService extends Service {
if (currentDownloading != null) {
currentDownloading.cancelDownload();
}
+
+ // Cancels current setup tasks
+ if(bufferTask != null && bufferTask.isRunning()) {
+ bufferTask.cancel();
+ bufferTask = null;
+ }
+ if(nextPlayingTask != null && nextPlayingTask.isRunning()) {
+ nextPlayingTask.cancel();
+ nextPlayingTask = null;
+ }
}
SharedPreferences prefs = Util.getPreferences(this);