From a8740f6b60ccb2cbb0de13ece75eab1338a8b803 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 4 Mar 2016 17:35:24 -0800 Subject: Fix auto deleting permanently cached podcasts --- .../main/java/github/daneren2005/dsub/service/DownloadService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') 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 3eab2855..96c97393 100644 --- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java +++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java @@ -743,7 +743,7 @@ public class DownloadService extends Service { int position = getPlayerPosition(); int duration = getPlayerDuration(); boolean cutoff = isPastCutoff(position, duration, true); - if(currentPlaying != null && currentPlaying.getSong() instanceof PodcastEpisode) { + if(currentPlaying != null && currentPlaying.getSong() instanceof PodcastEpisode && !currentPlaying.isSaved()) { if(cutoff) { currentPlaying.delete(); } @@ -1178,7 +1178,7 @@ public class DownloadService extends Service { } else { cutoff = isPastCutoff(position, duration); } - if(currentPlaying != null && currentPlaying.getSong() instanceof PodcastEpisode) { + if(currentPlaying != null && currentPlaying.getSong() instanceof PodcastEpisode && !currentPlaying.isSaved()) { if(cutoff) { toDelete.add(currentPlaying); } -- cgit v1.2.3