优化 #5593
This commit is contained in:
@@ -146,6 +146,11 @@ object AudioPlay : CoroutineScope by MainScope() {
|
|||||||
removeLoading(index)
|
removeLoading(index)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (chapter.isVolume) {
|
||||||
|
skipTo(index + 1)
|
||||||
|
removeLoading(index)
|
||||||
|
return
|
||||||
|
}
|
||||||
upLoading(true)
|
upLoading(true)
|
||||||
WebBook.getContent(this, bookSource, book, chapter)
|
WebBook.getContent(this, bookSource, book, chapter)
|
||||||
.onSuccess { content ->
|
.onSuccess { content ->
|
||||||
@@ -212,7 +217,8 @@ object AudioPlay : CoroutineScope by MainScope() {
|
|||||||
val book = book ?: return
|
val book = book ?: return
|
||||||
durChapter = appDb.bookChapterDao.getChapter(book.bookUrl, durChapterIndex)
|
durChapter = appDb.bookChapterDao.getChapter(book.bookUrl, durChapterIndex)
|
||||||
durAudioSize = durChapter?.end?.toInt() ?: 0
|
durAudioSize = durChapter?.end?.toInt() ?: 0
|
||||||
postEvent(EventBus.AUDIO_SUB_TITLE, durChapter?.title ?: appCtx.getString(R.string.data_loading))
|
val title = durChapter?.title ?: appCtx.getString(R.string.data_loading)
|
||||||
|
postEvent(EventBus.AUDIO_SUB_TITLE, title)
|
||||||
postEvent(EventBus.AUDIO_SIZE, durAudioSize)
|
postEvent(EventBus.AUDIO_SIZE, durAudioSize)
|
||||||
postEvent(EventBus.AUDIO_PROGRESS, durChapterPos)
|
postEvent(EventBus.AUDIO_PROGRESS, durChapterPos)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user