From 18efc9ecc8c9c22e4d7a6dfac6d3de966e723d37 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 22 Oct 2014 15:59:19 -0700 Subject: #415 Add method to force cutoff when calling next --- src/github/daneren2005/dsub/service/DownloadService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 81289f86..08516cfd 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -917,6 +917,9 @@ public class DownloadService extends Service { } public synchronized void next() { + + } + public synchronized void next(boolean forceCutoff) { // If only one song, just skip within song if(size() == 1) { seekTo(getPlayerPosition() + FAST_FORWARD); @@ -926,7 +929,12 @@ public class DownloadService extends Service { // Delete podcast if fully listened to int position = getPlayerPosition(); int duration = getPlayerDuration(); - boolean cutoff = isPastCutoff(position, duration); + boolean cutoff; + if(forceCutoff) { + cutoff = true; + } else { + cutoff = isPastCutoff(position, duration); + } if(currentPlaying != null && currentPlaying.getSong() instanceof PodcastEpisode) { if(cutoff) { toDelete.add(currentPlaying); -- cgit v1.2.3