aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-10-22 15:59:19 -0700
committerScott Jackson <daneren2005@gmail.com>2014-10-22 15:59:19 -0700
commit18efc9ecc8c9c22e4d7a6dfac6d3de966e723d37 (patch)
treede94d09edf5f4007fa303203dac11c2bf490124f /src
parentfd6ef4c67003db26bad5e10d4e2a375c5c9e6a58 (diff)
downloaddsub-18efc9ecc8c9c22e4d7a6dfac6d3de966e723d37.tar.gz
dsub-18efc9ecc8c9c22e4d7a6dfac6d3de966e723d37.tar.bz2
dsub-18efc9ecc8c9c22e4d7a6dfac6d3de966e723d37.zip
#415 Add method to force cutoff when calling next
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java10
1 files changed, 9 insertions, 1 deletions
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);