aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-05-23 13:03:20 -0700
committerScott Jackson <daneren2005@gmail.com>2015-05-23 13:03:20 -0700
commit329330f7b18b1d88236a234bb15cef22529aef02 (patch)
treeeaec762510100bc15e984cfa9a1833b0aa27a304 /app
parent1b53e39f71f4518caab8dadf92180f24ead8ccc2 (diff)
downloaddsub-329330f7b18b1d88236a234bb15cef22529aef02.tar.gz
dsub-329330f7b18b1d88236a234bb15cef22529aef02.tar.bz2
dsub-329330f7b18b1d88236a234bb15cef22529aef02.zip
#511 Cap isPastCutoff to a max of 10 minutes (for very large podcasts)
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java3
1 files changed, 2 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 c0268933..9e57f5b0 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -2104,7 +2104,8 @@ public class DownloadService extends Service {
return false;
}
- int cutoffPoint = (int) (duration * DELETE_CUTOFF);
+ // Make cutoff a maximum of 10 minutes
+ int cutoffPoint = Math.min((int) (duration * DELETE_CUTOFF), 10 * 60 * 1000);
boolean isPastCutoff = duration > 0 && position > cutoffPoint;
// Check to make sure song isn't within 10 seconds of where it was created