From 6fb78719f52d7085888126505d2a5adda7eb8ecd Mon Sep 17 00:00:00 2001 From: Hans-Peter Lehmann Date: Mon, 25 May 2026 22:31:00 +0200 Subject: [PATCH] Fix too many items showing up in playback history (#8476) ### Description Fix too many items showing up in playback history. When continuous playback is disabled, we still load the next episode to update the media session. However, we should not mark it as started. Otherwise we clutter the playback history with episodes that have not been played. ### Checklist - [x] I have read the contribution guidelines: https://github.com/AntennaPod/AntennaPod/blob/develop/CONTRIBUTING.md#submit-a-pull-request - [x] I have performed a self-review of my code, going through my changes line by line and carefully considering why this line change is necessary - [x] I have run the automated code checks using `./gradlew checkstyle lint` - [x] My code follows the style guidelines of the AntennaPod project: https://antennapod.org/contribute/develop/app/code-style - [x] I have mentioned the corresponding issue and the relevant keyword (e.g., "Closes: #xy") in the description (see https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) - [x] If it is a core feature, I have added automated tests --- .../antennapod/playback/service/Media3PlaybackService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playback/service/src/main/java/de/danoeh/antennapod/playback/service/Media3PlaybackService.java b/playback/service/src/main/java/de/danoeh/antennapod/playback/service/Media3PlaybackService.java index e1621fa22..0a65623f7 100644 --- a/playback/service/src/main/java/de/danoeh/antennapod/playback/service/Media3PlaybackService.java +++ b/playback/service/src/main/java/de/danoeh/antennapod/playback/service/Media3PlaybackService.java @@ -236,7 +236,8 @@ public class Media3PlaybackService extends MediaLibraryService { } else { EventBus.getDefault().post(BufferUpdateEvent.ended()); } - if (playbackState == Player.STATE_READY || playbackState == Player.STATE_ENDED) { + if ((playbackState == Player.STATE_READY && player.getPlayWhenReady()) + || playbackState == Player.STATE_ENDED) { saveCurrentPosition(); } if (playbackState == Player.STATE_ENDED && currentPlayable != null) {