diff options
author | Martin Fietz <martin.fietz@gmail.com> | 2017-10-15 21:47:40 +0200 |
---|---|---|
committer | Martin Fietz <martin.fietz@gmail.com> | 2017-10-15 21:47:40 +0200 |
commit | 47224f11ca1a36b5f8a567859e84241e3466ea5d (patch) | |
tree | 11bbc50b768128d957641693d8411e38ae57fd16 /app | |
parent | 688e123c3450cd077e6592cd47890a01cee0368e (diff) | |
download | AntennaPod-47224f11ca1a36b5f8a567859e84241e3466ea5d.zip |
Also check keep favorites preference in player widget service
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java b/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java index 007a4d744..b5bfb1ae4 100644 --- a/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java +++ b/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java @@ -17,6 +17,7 @@ import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; +import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.receiver.MediaButtonReceiver; import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.service.playback.PlayerStatus; @@ -69,7 +70,8 @@ public class PlayerWidgetService extends Service { DBWriter.markItemPlayed(item, FeedItem.PLAYED, false); DBWriter.removeQueueItem(this, item, false); DBWriter.addItemToPlaybackHistory(media); - if (item.getFeed().getPreferences().getCurrentAutoDelete()) { + if (item.getFeed().getPreferences().getCurrentAutoDelete() && + (!item.isTagged(FeedItem.TAG_FAVORITE) || !UserPreferences.shouldFavoriteKeepEpisode())) { Log.d(TAG, "Delete " + media.toString()); DBWriter.deleteFeedMediaOfItem(this, media.getId()); } |