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

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

Loading…
Cancel
Save