mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
941a21513a
commit
c0a110b523
@ -181,14 +181,11 @@ class HttpReadAloudService : BaseReadAloudService(),
|
||||
removeSpeakCache(fileName)
|
||||
downloadErrorNo++
|
||||
if (playErrorNo > 5) {
|
||||
downloadErrorNo = 0
|
||||
createSilentSound(fileName)
|
||||
val msg = "tts超时或连接错误超过5次\n${it.localizedMessage}"
|
||||
AppLog.put(msg, it)
|
||||
toastOnUi(msg)
|
||||
createSilentSound(fileName)
|
||||
if (playErrorNo > 10) {
|
||||
cancel()
|
||||
stopSelf()
|
||||
}
|
||||
} else {
|
||||
downloadAudio()
|
||||
}
|
||||
@ -196,7 +193,6 @@ class HttpReadAloudService : BaseReadAloudService(),
|
||||
else -> {
|
||||
removeSpeakCache(fileName)
|
||||
createSilentSound(fileName)
|
||||
val msg = "tts下载错误\n${it.localizedMessage}"
|
||||
AppLog.put(msg, it)
|
||||
toastOnUi(msg)
|
||||
Timber.e(it)
|
||||
|
Loading…
Reference in New Issue
Block a user