diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index 2f3dce53..170c549b 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -1300,6 +1300,11 @@ public class DownloadServiceImpl extends Service implements DownloadService { Log.i(TAG, "Ending position " + pos + " of " + duration); if (!isPartial || (downloadFile.isWorkDone() && (Math.abs(duration - pos) < 10000))) { playNext(); + + // Finished loading, delete when list is cleared + if(downloadFile.getSong() instanceof PodcastEpisode) { + toDelete.add(downloadFile); + } } else { // If file is not completely downloaded, restart the playback from the current position. synchronized (DownloadServiceImpl.this) { @@ -1319,11 +1324,6 @@ public class DownloadServiceImpl extends Service implements DownloadService { } } - // Finished loading, delete when list is cleared - if(downloadFile.getSong() instanceof PodcastEpisode) { - toDelete.add(downloadFile); - } - wakeLock.release(); } }); |