diff options
author | ByteHamster <info@bytehamster.com> | 2020-06-09 22:19:03 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-06-09 22:19:34 +0200 |
commit | d2526dd4399289a839b792a27c1456b2ebcb2f8d (patch) | |
tree | b1238c7c616d2bb6255f2ba63b5c335c0c5b67f0 | |
parent | a7b38bd152e6891d5ed7effb0302a9666cb52e0c (diff) | |
download | AntennaPod-d2526dd4399289a839b792a27c1456b2ebcb2f8d.zip |
Fixed crash when loading chapters fails
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java index 17cd1b24a..afa7fcebf 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceTaskManager.java @@ -311,12 +311,13 @@ public class PlaybackServiceTaskManager { if (media.getChapters() == null) { Completable.create(emitter -> { - media.loadChapterMarks(); - emitter.onComplete(); - }) + media.loadChapterMarks(); + emitter.onComplete(); + }) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(() -> callback.onChapterLoaded(media)); + .subscribe(() -> callback.onChapterLoaded(media), + throwable -> Log.d(TAG, "Error loading chapters: " + Log.getStackTraceString(throwable))); } } |