From 2d68f025d7429103e702c3ba4e15b0529573aa02 Mon Sep 17 00:00:00 2001 From: Tim Butram Date: Tue, 26 Aug 2014 21:18:00 -0400 Subject: Added option to delete epidode upon completion of playback. Conflicts: app/dslv --- .../danoeh/antennapod/core/service/playback/PlaybackService.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core') diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index a5560e3fb..94e490149 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -539,6 +539,15 @@ public class PlaybackService extends Service { if (isAutoFlattrable(media) && UserPreferences.getAutoFlattrPlayedDurationThreshold() == 1.0f) { DBTasks.flattrItemIfLoggedIn(PlaybackService.this, item); } + + //Delete episode if enabled + if(UserPreferences.isAutoDelete()) { + DBWriter.deleteFeedMediaOfItem(PlaybackService.this, item.getMedia().getId()); + + if(BuildConfig.DEBUG) + Log.d(TAG, "Episode Deleted"); + } + } // Load next episode if previous episode was in the queue and if there -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0