diff --git a/CHANGELOG.md b/CHANGELOG.md index 122ed0923..4898e1f96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ within it - Fixed freezing occuring when scrolling through large music libraries - Fixed app not responding once music loading completes for large libraries - Fixed crash when the last song of the queue gets removed while playing -- Fixed playback UI not re-appearing after playback ends +- Fixed playback UI and notification not re-appearing after playback ends #### What's Changed - Android Lollipop and Marshmallow support have been dropped diff --git a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt index c1dbbe7c2..ab95fba78 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt @@ -226,8 +226,11 @@ class PlaybackService : if (song == null) { // No song, stop playback and foreground state. logD("Nothing playing, stopping playback") + // For some reason the player does not mark playWhenReady as false when stopped, + // which then completely breaks any re-initialization if playback starts again. + // So we manually set it to false here. + player.playWhenReady = false player.stop() - stopAndSave() return }