diff --git a/app/src/main/java/io/legado/app/service/AudioPlayService.kt b/app/src/main/java/io/legado/app/service/AudioPlayService.kt index 64104ed87..1c6d215bd 100644 --- a/app/src/main/java/io/legado/app/service/AudioPlayService.kt +++ b/app/src/main/java/io/legado/app/service/AudioPlayService.kt @@ -274,7 +274,6 @@ class AudioPlayService : BaseService(), if (index == AudioPlay.durChapterIndex) { bookChapter = chapter subtitle = chapter.title - postEvent(EventBus.AUDIO_SUB_TITLE, subtitle) postEvent(EventBus.AUDIO_SIZE, chapter.end?.toInt() ?: 0) postEvent(EventBus.AUDIO_PROGRESS, position) } diff --git a/app/src/main/java/io/legado/app/service/help/AudioPlay.kt b/app/src/main/java/io/legado/app/service/help/AudioPlay.kt index ec120b491..35e6a4d1c 100644 --- a/app/src/main/java/io/legado/app/service/help/AudioPlay.kt +++ b/app/src/main/java/io/legado/app/service/help/AudioPlay.kt @@ -123,6 +123,9 @@ object AudioPlay { fun next(context: Context) { Coroutine.async { book?.let { book -> + if (book.durChapterIndex >= book.totalChapterNum) { + return@let + } pause(context) durChapterIndex++ durPageIndex = 0