pull/1391/head
gedoor 3 years ago
parent 355705dc6b
commit e491745d9e
  1. 2
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt

@ -127,6 +127,7 @@ class HttpReadAloudService : BaseReadAloudService(),
headerMapF = httpTts.getHeaderMap(true) headerMapF = httpTts.getHeaderMap(true)
) )
var response = analyzeUrl.getResponseAwait() var response = analyzeUrl.getResponseAwait()
ensureActive()
httpTts.loginCheckJs?.takeIf { checkJs -> httpTts.loginCheckJs?.takeIf { checkJs ->
checkJs.isNotBlank() checkJs.isNotBlank()
}?.let { checkJs -> }?.let { checkJs ->
@ -141,6 +142,7 @@ class HttpReadAloudService : BaseReadAloudService(),
} }
} }
} }
ensureActive()
response.body!!.bytes().let { bytes -> response.body!!.bytes().let { bytes ->
ensureActive() ensureActive()
val file = createSpeakFileAsMd5IfNotExist(fileName) val file = createSpeakFileAsMd5IfNotExist(fileName)

Loading…
Cancel
Save