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'
|
extName = 'SuperStream'
|
||||||
pkgNameSuffix = 'en.superstream'
|
pkgNameSuffix = 'en.superstream'
|
||||||
extClass = '.SuperStream'
|
extClass = '.SuperStream'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
libVersion = '13'
|
libVersion = '13'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ class SuperStream : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||||||
filters: AnimeFilterList
|
filters: AnimeFilterList
|
||||||
): Observable<AnimesPage> {
|
): Observable<AnimesPage> {
|
||||||
val searchResult = superStreamAPI.search(page, query)
|
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")
|
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.NoSuchAlgorithmException
|
||||||
import java.security.SecureRandom
|
import java.security.SecureRandom
|
||||||
import java.security.cert.X509Certificate
|
import java.security.cert.X509Certificate
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.crypto.Cipher
|
import javax.crypto.Cipher
|
||||||
import javax.crypto.spec.IvParameterSpec
|
import javax.crypto.spec.IvParameterSpec
|
||||||
import javax.crypto.spec.SecretKeySpec
|
import javax.crypto.spec.SecretKeySpec
|
||||||
@ -823,7 +824,7 @@ class SuperStreamAPI(val json: Json) {
|
|||||||
key
|
key
|
||||||
)
|
)
|
||||||
}","encrypt_data":"$encryptedQuery"}"""
|
}","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()
|
val formData: RequestBody = FormBody.Builder()
|
||||||
.add("data", base64Body)
|
.add("data", base64Body)
|
||||||
@ -1091,6 +1092,7 @@ private fun configureToIgnoreCertificate(): OkHttpClient {
|
|||||||
return OkHttpClient.Builder()
|
return OkHttpClient.Builder()
|
||||||
.sslSocketFactory(sslSocketFactory, trustAllCerts[0] as X509TrustManager)
|
.sslSocketFactory(sslSocketFactory, trustAllCerts[0] as X509TrustManager)
|
||||||
.hostnameVerifier { _, _ -> true }
|
.hostnameVerifier { _, _ -> true }
|
||||||
|
.readTimeout(70, TimeUnit.SECONDS)
|
||||||
.build()
|
.build()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
throw Exception("Exception while configuring IgnoreSslCertificate: $e")
|
throw Exception("Exception while configuring IgnoreSslCertificate: $e")
|
||||||
|
Reference in New Issue
Block a user