diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-12-04 17:59:51 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-12-04 17:59:51 -0800 |
commit | 3a71eece405c1ef624768fdcda0d06cc20c90ee8 (patch) | |
tree | a4af4ae20ad42b87e2d19debdc3bb33992cd79af /src/github | |
parent | 28654256a22bcaaf72074ef0247f9fbc9d8d65f8 (diff) | |
download | dsub-3a71eece405c1ef624768fdcda0d06cc20c90ee8.tar.gz dsub-3a71eece405c1ef624768fdcda0d06cc20c90ee8.tar.bz2 dsub-3a71eece405c1ef624768fdcda0d06cc20c90ee8.zip |
Fix podcast deleting
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceImpl.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java index abee1153..8b069217 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java @@ -512,8 +512,10 @@ public class DownloadServiceImpl extends Service implements DownloadService { public synchronized void clear(boolean serialize) { // Delete podcast if fully listened to if(currentPlaying != null && currentPlaying.getSong() instanceof PodcastEpisode) { + int duration = getPlayerDuration(); + // Make sure > 95% of the way through - int cutoffPoint = getPlayerDuration() * 0.95; + int cutoffPoint = (int)(duration * 0.95); if(duration > 0 && cachedPosition > cutoffPoint) { currentPlaying.delete(); } |