From 846a7379d8ec90be1cef815295d123fb98cb4891 Mon Sep 17 00:00:00 2001 From: Ktouls <75007654+Ktouls@users.noreply.github.com> Date: Sun, 28 Dec 2025 14:23:44 +0800 Subject: [PATCH] =?UTF-8?q?HttpReadAloudService:=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 缓存清理时间从10分钟改为30分钟 2. 非流式播放时预缓存下一整章音频(移除10句限制) --- .../main/java/io/legado/app/service/HttpReadAloudService.kt | 3 +-- 1 file changed, 1 insertion(+), 2 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 bfc684c4b..e70e78229 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -265,7 +265,6 @@ class HttpReadAloudService : BaseReadAloudService(), val contentList = textChapter.getNeedReadAloud(0, readAloudByPage, 0, 1) .splitToSequence("\n") .filter { it.isNotEmpty() } - .take(10) .toList() contentList.forEach { content -> currentCoroutineContext().ensureActive() @@ -436,7 +435,7 @@ class HttpReadAloudService : BaseReadAloudService(), FileUtils.listDirsAndFiles(ttsFolderPath)?.forEach { val isSilentSound = it.length() == 2160L if ((!it.name.startsWith(titleMd5) - && System.currentTimeMillis() - it.lastModified() > 600000) + && System.currentTimeMillis() - it.lastModified() > 1800000) || isSilentSound ) { FileUtils.delete(it.absolutePath)