Fix SuperStream timeout and Zoro

This commit is contained in:
Blatzar 2022-11-18 00:16:20 +01:00
parent 5b5d6d9481
commit cdb34effb3
4 changed files with 19 additions and 17 deletions

View File

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 9 version = 10
cloudstream { cloudstream {

View File

@ -1,6 +1,7 @@
package com.lagradost package com.lagradost
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.SflixProvider.Companion.extractRabbitStream
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
@ -345,21 +346,21 @@ class ZoroProvider : MainAPI() {
val extractorLink = app.get( val extractorLink = app.get(
link, link,
).parsed<RapidCloudResponse>().link ).parsed<RapidCloudResponse>().link
// val hasLoadedExtractorLink = val hasLoadedExtractorLink =
loadExtractor(extractorLink, "https://rapid-cloud.ru/", subtitleCallback, callback) loadExtractor(extractorLink, "https://rapid-cloud.ru/", subtitleCallback, callback)
// if (!hasLoadedExtractorLink) { if (!hasLoadedExtractorLink) {
// extractRabbitStream( extractRabbitStream(
// extractorLink, extractorLink,
// subtitleCallback, subtitleCallback,
// // Blacklist VidCloud for now // Blacklist VidCloud for now
// { videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) }, { videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) },
//// false, false,
//// extractorData, null,
//// decryptKey = getKey() decryptKey = getKey()
// ) { sourceName -> ) { sourceName ->
// sourceName + " - ${it.first}" sourceName + " - ${it.first}"
// } }
// } }
} }
return true return true

View File

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 4 version = 5
cloudstream { cloudstream {

View File

@ -22,6 +22,7 @@ import javax.crypto.spec.SecretKeySpec
import kotlin.math.roundToInt import kotlin.math.roundToInt
class SuperStream : MainAPI() { class SuperStream : MainAPI() {
private val timeout = 120L
override var name = "SuperStream" override var name = "SuperStream"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true
@ -177,7 +178,7 @@ class SuperStream : MainAPI() {
"medium" to "Website&token$token" "medium" to "Website&token$token"
) )
return app.post(apiUrl, headers = headers, data = data) return app.post(apiUrl, headers = headers, data = data, timeout = timeout)
} }
private suspend inline fun <reified T : Any> queryApiParsed(query: String): T { private suspend inline fun <reified T : Any> queryApiParsed(query: String): T {