diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java index af735aefd..0e64f484f 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java @@ -609,6 +609,9 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer { public void shutdown() { executor.shutdown(); if (mediaPlayer != null) { + try { + mediaPlayer.stop(); + } catch (Exception ignore) { } mediaPlayer.release(); } releaseWifiLockIfNecessary(); diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java index 49de7ffe7..8cdf82e15 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java @@ -188,6 +188,9 @@ public class DBWriter { if(queue.remove(item)) { removed.add(item); } + if (item.getState() == FeedItem.State.PLAYING && PlaybackService.isRunning) { + context.stopService(new Intent(context, PlaybackService.class)); + } if (item.getMedia() != null && item.getMedia().isDownloaded()) { File mediaFile = new File(item.getMedia()