SuperStream: Fix search pagination (#1036)
* SuperStream: Fix search pagination also increase read timeout to 70 seconds * SuperStream: Fix search pagination also increase read timeout to 70 seconds
This commit is contained in:
@ -6,7 +6,7 @@ ext {
|
||||
extName = 'SuperStream'
|
||||
pkgNameSuffix = 'en.superstream'
|
||||
extClass = '.SuperStream'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
libVersion = '13'
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ class SuperStream : ConfigurableAnimeSource, AnimeHttpSource() {
|
||||
filters: AnimeFilterList
|
||||
): Observable<AnimesPage> {
|
||||
val searchResult = superStreamAPI.search(page, query)
|
||||
return Observable.just(AnimesPage(searchResult, page < 8))
|
||||
return Observable.just(AnimesPage(searchResult, searchResult.size == 20))
|
||||
}
|
||||
|
||||
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList) = throw Exception("not used")
|
||||
|
@ -700,6 +700,7 @@ import java.security.MessageDigest
|
||||
import java.security.NoSuchAlgorithmException
|
||||
import java.security.SecureRandom
|
||||
import java.security.cert.X509Certificate
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.crypto.Cipher
|
||||
import javax.crypto.spec.IvParameterSpec
|
||||
import javax.crypto.spec.SecretKeySpec
|
||||
@ -823,7 +824,7 @@ class SuperStreamAPI(val json: Json) {
|
||||
key
|
||||
)
|
||||
}","encrypt_data":"$encryptedQuery"}"""
|
||||
val base64Body = String(Base64.encode(newBody.toByteArray(), Base64.DEFAULT))
|
||||
val base64Body = String(Base64.encode(newBody.toByteArray(), Base64.NO_WRAP))
|
||||
|
||||
val formData: RequestBody = FormBody.Builder()
|
||||
.add("data", base64Body)
|
||||
@ -1091,6 +1092,7 @@ private fun configureToIgnoreCertificate(): OkHttpClient {
|
||||
return OkHttpClient.Builder()
|
||||
.sslSocketFactory(sslSocketFactory, trustAllCerts[0] as X509TrustManager)
|
||||
.hostnameVerifier { _, _ -> true }
|
||||
.readTimeout(70, TimeUnit.SECONDS)
|
||||
.build()
|
||||
} catch (e: Exception) {
|
||||
throw Exception("Exception while configuring IgnoreSslCertificate: $e")
|
||||
|
Reference in New Issue
Block a user