pull/1463/head
gedoor 3 years ago
parent 941a21513a
commit c0a110b523
  1. 8
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt

@ -181,14 +181,11 @@ class HttpReadAloudService : BaseReadAloudService(),
removeSpeakCache(fileName) removeSpeakCache(fileName)
downloadErrorNo++ downloadErrorNo++
if (playErrorNo > 5) { if (playErrorNo > 5) {
downloadErrorNo = 0
createSilentSound(fileName)
val msg = "tts超时或连接错误超过5次\n${it.localizedMessage}" val msg = "tts超时或连接错误超过5次\n${it.localizedMessage}"
AppLog.put(msg, it) AppLog.put(msg, it)
toastOnUi(msg) toastOnUi(msg)
createSilentSound(fileName)
if (playErrorNo > 10) {
cancel()
stopSelf()
}
} else { } else {
downloadAudio() downloadAudio()
} }
@ -196,7 +193,6 @@ class HttpReadAloudService : BaseReadAloudService(),
else -> { else -> {
removeSpeakCache(fileName) removeSpeakCache(fileName)
createSilentSound(fileName) createSilentSound(fileName)
val msg = "tts下载错误\n${it.localizedMessage}"
AppLog.put(msg, it) AppLog.put(msg, it)
toastOnUi(msg) toastOnUi(msg)
Timber.e(it) Timber.e(it)

Loading…
Cancel
Save