aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github/daneren2005
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-03-10 18:03:33 -0800
committerScott Jackson <daneren2005@gmail.com>2016-03-10 18:03:33 -0800
commiteb49873afdebc1fc27bfbc7b15dfdc312a96a3de (patch)
treef893feaf24136e4ee071c1b7b5b4350aad308295 /app/src/main/java/github/daneren2005
parent44ca5f7438e111459358993aa3caa3b416a02ed6 (diff)
downloaddsub-eb49873afdebc1fc27bfbc7b15dfdc312a96a3de.tar.gz
dsub-eb49873afdebc1fc27bfbc7b15dfdc312a96a3de.tar.bz2
dsub-eb49873afdebc1fc27bfbc7b15dfdc312a96a3de.zip
Fix cutoff calculation to not always do duration - 10 minutes (supposed to max out at duration - 10 minutes)
Diffstat (limited to 'app/src/main/java/github/daneren2005')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
index b5a44ec1..8ea7538b 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -2357,7 +2357,7 @@ public class DownloadService extends Service {
}
// Make cutoff a maximum of 10 minutes
- int cutoffPoint = Math.min((int) (duration * DELETE_CUTOFF), 10 * 60 * 1000);
+ int cutoffPoint = Math.max((int) (duration * DELETE_CUTOFF), duration - 10 * 60 * 1000);
boolean isPastCutoff = duration > 0 && position > cutoffPoint;
// Check to make sure song isn't within 10 seconds of where it was created