aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2014-04-30 10:28:55 -0700
committerdaneren2005 <daneren2005@gmail.com>2014-04-30 10:28:55 -0700
commit028cc118b3547613768c35185c21c489de05e32d (patch)
tree8fc5e9e4602f3e13d74d62eedf3bc44b0937e0da
parentc388ae2b7b739f11e3e628d2e784004a53b56eea (diff)
downloaddsub-028cc118b3547613768c35185c21c489de05e32d.tar.gz
dsub-028cc118b3547613768c35185c21c489de05e32d.tar.bz2
dsub-028cc118b3547613768c35185c21c489de05e32d.zip
Fix going into offline mode losing up progress
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index d5a71207..eae4fda1 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -508,12 +508,16 @@ public class DownloadService extends Service {
}
public synchronized void clearIncomplete() {
- reset();
Iterator<DownloadFile> iterator = downloadList.iterator();
while (iterator.hasNext()) {
DownloadFile downloadFile = iterator.next();
if (!downloadFile.isCompleteFileAvailable()) {
iterator.remove();
+
+ // Reset if the current playing song has been removed
+ if(currentPlaying == downloadFile) {
+ reset();
+ }
}
}
lifecycleSupport.serializeDownloadQueue();