pull/1395/head
gedoor 3 years ago
parent 1ae61a04b7
commit 7875e73c6b
  1. 5
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt
  2. 2
      app/src/main/java/io/legado/app/ui/login/SourceLoginDialog.kt

@ -145,13 +145,14 @@ class HttpReadAloudService : BaseReadAloudService(),
downloadAudio() downloadAudio()
} catch (e: ConnectException) { } catch (e: ConnectException) {
removeSpeakCacheFile(fileName) removeSpeakCacheFile(fileName)
toastOnUi("tts接口网络错误") toastOnUi("tts接口网络错误\n${e.localizedMessage}")
} catch (e: IOException) { } catch (e: IOException) {
val file = getSpeakFileAsMd5(fileName) val file = getSpeakFileAsMd5(fileName)
if (file.exists()) { if (file.exists()) {
FileUtils.deleteFile(file.absolutePath) FileUtils.deleteFile(file.absolutePath)
} }
toastOnUi("tts文件解析错误") AppLog.put("tts文件解析错误")
toastOnUi("tts文件解析错误\n${e.localizedMessage}")
} catch (e: Exception) { } catch (e: Exception) {
removeSpeakCacheFile(fileName) removeSpeakCacheFile(fileName)
createSpeakFileAsMd5IfNotExist(fileName) createSpeakFileAsMd5IfNotExist(fileName)

@ -122,7 +122,7 @@ class SourceLoginDialog : BaseDialogFragment(R.layout.dialog_login) {
} }
} catch (e: Exception) { } catch (e: Exception) {
AppLog.put("登录出错\n${e.localizedMessage}", e) AppLog.put("登录出错\n${e.localizedMessage}", e)
context?.toastOnUi("error:${e.localizedMessage}") context?.toastOnUi("登录出错\n${e.localizedMessage}")
e.printOnDebug() e.printOnDebug()
} }
} }

Loading…
Cancel
Save