From d3b5d9c2b8037d2edc17de073a83f67451a2e1c5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 17 Oct 2021 13:12:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/service/HttpReadAloudService.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index fb9aac776..beb499c8f 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -281,6 +281,9 @@ class HttpReadAloudService : BaseReadAloudService(), return@launch } val speakTextLength = contentList[nowSpeak].length + if (speakTextLength <= 0) { + return@launch + } val sleep = mediaPlayer.duration / speakTextLength val start = speakTextLength * mediaPlayer.currentPosition / mediaPlayer.duration for (i in start..contentList[nowSpeak].length) {