From 355705dc6bdc844fc5c637f254225b9a60f25955 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 18 Oct 2021 14:22:39 +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 --- .../java/io/legado/app/service/HttpReadAloudService.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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 cb8badd48..31b9747ac 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -113,12 +113,10 @@ class HttpReadAloudService : BaseReadAloudService(), } } else if (hasSpeakCache(fileName)) { //缓存文件还在,可能还没下载完 return@forEachIndexed - } else { //没有下载并且没有缓存文件 - if (speakText.isEmpty()) { - ensureActive() - createSilentSound(fileName) - return@forEachIndexed - } + } else if (speakText.isEmpty()) { + createSilentSound(fileName) + return@forEachIndexed + } else { try { createSpeakCache(fileName) val analyzeUrl = AnalyzeUrl(