diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2020-11-06 22:57:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-06 22:57:57 +0100 |
commit | 29f46d97c03674440dde4f8be199547927dda645 (patch) | |
tree | 733234c61227a647a779e11a488e75e38d9b3f9e | |
parent | 3326f91573685e53d2004ca352eacc1489dc3f00 (diff) | |
parent | 688f1b370c093abecbd4c17643e8661246fcc6c1 (diff) | |
download | AntennaPod-29f46d97c03674440dde4f8be199547927dda645.zip |
Merge pull request #4659 from ByteHamster/fix-playback
Fix using wrong playable object
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index 60075dda6..69b35bff5 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -517,11 +517,12 @@ public class PlaybackService extends MediaBrowserServiceCompat { .observeOn(AndroidSchedulers.mainThread()) .subscribe( playableLoaded -> { - mediaPlayer.playMediaObject(playable, stream, startWhenPrepared, + mediaPlayer.playMediaObject(playableLoaded, stream, startWhenPrepared, prepareImmediately); - addPlayableToQueue(playable); + addPlayableToQueue(playableLoaded); }, error -> { Log.d(TAG, "Playable was not found. Stopping service."); + error.printStackTrace(); stateManager.stopService(); }); return Service.START_NOT_STICKY; @@ -729,6 +730,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { addPlayableToQueue(playable); }, error -> { Log.d(TAG, "Playable was not loaded from preferences. Stopping service."); + error.printStackTrace(); stateManager.stopService(); }); } |