pull/737/head
Robot 4 years ago
commit 9ef504fb9b
  1. 6
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/changesource/ChangeSourceDialog.kt

@ -297,12 +297,14 @@ class AnalyzeUrl(
RequestMethod.POST -> {
if (fieldMap.isNotEmpty()) {
RxHttp.postForm(url)
.setAssemblyEnabled(false)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAllEncoded(fieldMap)
.addAllHeader(headerMap)
.toStrResponse().await()
} else {
RxHttp.postJson(url)
.setAssemblyEnabled(false)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(body)
.addAllHeader(headerMap)
@ -310,6 +312,7 @@ class AnalyzeUrl(
}
}
else -> RxHttp.get(url)
.setAssemblyEnabled(false)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAllEncoded(fieldMap)
.addAllHeader(headerMap)
@ -323,12 +326,14 @@ class AnalyzeUrl(
RequestMethod.POST -> {
if (fieldMap.isNotEmpty()) {
RxHttp.postForm(url)
.setAssemblyEnabled(false)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAllEncoded(fieldMap)
.addAllHeader(headerMap)
.toByteArray().await()
} else {
RxHttp.postJson(url)
.setAssemblyEnabled(false)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAll(body)
.addAllHeader(headerMap)
@ -336,6 +341,7 @@ class AnalyzeUrl(
}
}
else -> RxHttp.get(url)
.setAssemblyEnabled(false)
.setOkClient(HttpHelper.getProxyClient(proxy))
.addAllEncoded(fieldMap)
.toByteArray().await()

@ -182,6 +182,7 @@ class ChangeSourceDialog : BaseDialogFragment(),
putPrefString("searchGroup", item.title.toString())
}
viewModel.stopSearch()
viewModel.loadDbSearchBook()
}
}
}

Loading…
Cancel
Save