edit HttpReadAloudService.kt 取消下载文件错误检测,会导致朗读中断

pull/840/head
gedoor 4 years ago
parent 1ff21378c2
commit 2f1662a0ff
  1. 6
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt

@ -116,12 +116,6 @@ class HttpReadAloudService : BaseReadAloudService(),
val fis = FileInputStream(file) val fis = FileInputStream(file)
// 用来检测下载的文件是否为可正常播放的音频 (如果不是的话抛出异常,没找到更秒的办法,先这么着吧)
MediaPlayer().apply {
setDataSource(fis.fd)
prepare()
release()
}
if (index == nowSpeak) { if (index == nowSpeak) {
@Suppress("BlockingMethodInNonBlockingContext") @Suppress("BlockingMethodInNonBlockingContext")
playAudio(fis.fd) playAudio(fis.fd)

Loading…
Cancel
Save