From 028cc118b3547613768c35185c21c489de05e32d Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Wed, 30 Apr 2014 10:28:55 -0700 Subject: Fix going into offline mode losing up progress --- src/github/daneren2005/dsub/service/DownloadService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/github/daneren2005') 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 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(); -- cgit v1.2.3