diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2017-10-20 20:37:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 20:37:16 +0200 |
commit | 3eb637d690ec21cc9b98da1dde324c3ff2f07770 (patch) | |
tree | 316a3652d2486181ab1d004b1f4166729e064cb4 /app | |
parent | cef70063ffc7ce54caa12d65c83e2497eccbd3a7 (diff) | |
parent | 47224f11ca1a36b5f8a567859e84241e3466ea5d (diff) | |
download | AntennaPod-3eb637d690ec21cc9b98da1dde324c3ff2f07770.zip |
Merge pull request #2443 from AntennaPod/followup/2272
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()); } |