Merge pull request #4232 from ByteHamster/fix-crash-loading-chapters
Fixed crash when loading chapters fails
This commit is contained in:
commit
51e17214f8
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue