diff options
author | Tim Butram <tbutram@worldsproject.org> | 2014-08-26 21:18:00 -0400 |
---|---|---|
committer | Sam Whited <sam@samwhited.com> | 2015-01-18 19:17:14 -0500 |
commit | 2d68f025d7429103e702c3ba4e15b0529573aa02 (patch) | |
tree | 298bb7bbafa602d9e070bd952a3f85f7979d0524 /core/src/main/java | |
parent | 9659c18d899349d9be1573fb9520defc7d3a19cd (diff) | |
download | AntennaPod-2d68f025d7429103e702c3ba4e15b0529573aa02.zip |
Added option to delete epidode upon completion of playback.
Conflicts:
app/dslv
Diffstat (limited to 'core/src/main/java')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java | 9 |
1 files changed, 9 insertions, 0 deletions
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 |