pull/1395/head
gedoor 3 years ago
parent 0e24588776
commit 8b6698ae86
  1. 6
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt

@ -144,7 +144,7 @@ class HttpReadAloudService : BaseReadAloudService(),
downloadAudio() downloadAudio()
} catch (e: ConnectException) { } catch (e: ConnectException) {
removeSpeakCacheFile(fileName) removeSpeakCacheFile(fileName)
toastOnUi("网络错误") toastOnUi("tts接口网络错误")
} catch (e: IOException) { } catch (e: IOException) {
val file = getSpeakFileAsMd5(fileName) val file = getSpeakFileAsMd5(fileName)
if (file.exists()) { if (file.exists()) {
@ -152,8 +152,10 @@ class HttpReadAloudService : BaseReadAloudService(),
} }
toastOnUi("tts文件解析错误") toastOnUi("tts文件解析错误")
} catch (e: Exception) { } catch (e: Exception) {
e.printOnDebug()
removeSpeakCacheFile(fileName) removeSpeakCacheFile(fileName)
AppLog.put("tts接口错误\n${e.localizedMessage}", e)
toastOnUi("tts接口错误\n${e.localizedMessage}")
e.printOnDebug()
} }
} }
} }

Loading…
Cancel
Save